mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove ssa/ass tags from text subtitles
This commit is contained in:
parent
22d866c61d
commit
9a171c36ec
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