videojs / vtt.js

A JavaScript implementation of the WebVTT specification, forked from vtt.js for use with Video.js

Home Page:http://dev.w3.org/html5/webvtt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTML parser crashing on trailing <

arski opened this issue · comments

@gkatsev interesting question, ive a cue that literally ends with a <, e.g. "something something <".

I know this is a pretty bad cue and it should probably not have the trailing <, but the bad thing is that it actually crashes pretty badly on https://github.com/videojs/vtt.js/blob/master/lib/vtt.js#L346 - now this code is forked from mozilla's, so it's not something you introduced, but Im wondering if you would accept a PR here, or if I should send one to mozilla and if you would update from them later?

For the record, a cue like "something something <bla <" works fine :)

We'd accept a PR, though, if you can also provide the PR against mozilla's repo as well, that would be good.

@gkatsev 👍 given its the same diff against both, can easily open two PRs, thanks

@gkatsev any comments on this?