diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index 9ad2b6dda..fd4f7f130 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -137,7 +137,10 @@ function zoomIn(elem) { } 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, '
') : result; }