mozilla / vtt.js

A JavaScript implementation of the WebVTT specification
http://dev.w3.org/html5/webvtt/
Apache License 2.0
479 stars 94 forks source link

Make sure parser doesnt crash on trailing lt #370

Closed arski closed 6 years ago

arski commented 6 years ago

If a cue ends with just an opening <, the regex in the parseContent method doesnt find neither preceding text nor an actual tag, and just crashes in the consume method.

This makes sure cues like "bla bla<" result in "bla bla" text displayed, just as would be the case for "bla bla<mytag".

ref videojs#18

arski commented 6 years ago

cc @luarmr @practual @jillesme fixing parsing error in vtt.js

arski commented 6 years ago

Hello, would appreciate a review, thanks

arski commented 6 years ago

this was approved and will be merged in videojs/vtt.. nobody is responding here so ill close the pr :(