Skip to content

Commit 2cb553f

Browse files
ableplayer#692 Parse timestamp tags in WebVTT
These get sanitized by DOMPurify, we need to put them back
1 parent 2f5577f commit 2cb553f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎scripts/validate.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,9 @@ var validate = {
185185
var processedLangTags = postProcessing.postprocessLangTag(processedVTags);
186186

187187
var arrowReplaced = processedLangTags.replace(/-->/g, "-->");
188+
var timestampTagReplaced = arrowReplaced.replace(/&lt;([\d:.]+)&gt;/g, '<$1>');
188189

189-
var finalContent = arrowReplaced.replace(
190+
var finalContent = timestampTagReplaced.replace(
190191
/<\/v>/g,
191192
function (match, offset) {
192193
return originalVttContent.indexOf(match, offset) !== -1 ? match : "";

0 commit comments

Comments
 (0)