зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1283803 - part4 : handle unicode \u0000 and \uFFFD. r=rillian
MozReview-Commit-ID: FtDPV9U7ffS --HG-- extra : rebase_source : 787502b5cfccc216f7c6176a597aaf10fb3b5252
This commit is contained in:
Родитель
3f39c1932c
Коммит
0b085222cf
|
@ -177,7 +177,7 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
|
|||
"Malformed timestamp: " + oInput);
|
||||
}
|
||||
// Remove time stamp from input.
|
||||
input = input.replace(/^[^\sa-zA-Z-]+/, "");
|
||||
input = input.replace(/^[^\s\uFFFDa-zA-Z-]+/, "");
|
||||
return ts;
|
||||
}
|
||||
|
||||
|
@ -1266,7 +1266,8 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
|
|||
++pos;
|
||||
}
|
||||
self.buffer = buffer.substr(pos);
|
||||
return line;
|
||||
// Spec defined replacement.
|
||||
return line.replace(/[\u0000]/g, "\uFFFD");
|
||||
}
|
||||
|
||||
function createCueIfNeeded() {
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[001.html]
|
||||
type: testharness
|
||||
[WebVTT parser tests, nulls.vtt]
|
||||
expected: FAIL
|
Загрузка…
Ссылка в новой задаче