Merge pull request #4658 from thornbill/no-ssa-in-srt
Remove ssa/ass tags from text subtitles
This commit is contained in:
commit
639e7dcad9
1 changed files with 4 additions and 1 deletions
|
@ -137,7 +137,10 @@ function zoomIn(elem) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function normalizeTrackEventText(text, useHtml) {
|
function normalizeTrackEventText(text, useHtml) {
|
||||||
const result = text.replace(/\\N/gi, '\n').replace(/\r/gi, '');
|
const result = text
|
||||||
|
.replace(/\\N/gi, '\n') // Correct newline characters
|
||||||
|
.replace(/\r/gi, '') // Remove carriage return characters
|
||||||
|
.replace(/{\\.*?}/gi, ''); // Remove ass/ssa tags
|
||||||
return useHtml ? result.replace(/\n/gi, '<br>') : result;
|
return useHtml ? result.replace(/\n/gi, '<br>') : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue