Bug 1328966 - Accept \r as a valid line ending. r=alwu

See https://w3c.github.io/webvtt/#webvtt-line-terminator for
allowed values.

MozReview-Commit-ID: C62Lu4PNQRE

--HG--
extra : rebase_source : 7c9215477ad39dbe319374357ef8f19d96ed423c
This commit is contained in:
Ralph Giles 2017-01-12 11:20:26 -08:00
parent 92c0be81ed
commit 1721921258

View File

@ -1438,7 +1438,7 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
if (!line) {
// Since the data receiving is async, we need to wait until the
// buffer gets the full line.
if (!/\r\n|\n/.test(self.buffer)) {
if (!/\r\n|\n|\r/.test(self.buffer)) {
return this;
}
line = collectNextLine();