Skip to content

Commit 37b976b

Browse files
authored
Merge pull request #693 from richard-smith-preservica/timestamp-tags-webvtt-unsanitize
#692 Parse timestamp tags in WebVTT
2 parents 2f5577f + 2cb553f commit 37b976b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)