aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs
diff options
context:
space:
mode:
authorDavid Ullmer <daullmer@gmail.com>2021-02-11 13:48:58 +0100
committerDavid Ullmer <daullmer@gmail.com>2021-02-11 13:48:58 +0100
commitab5fb1b1f201795041a960c74b540c768fe8d08b (patch)
tree579964cea4db7e04299084d555e493b9dc74ca54 /MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs
parentae57ed4ac70eda1046c86e40e41b9683b2115f59 (diff)
parentd490c1c2bcb2852c9159e8578bc7a60e086e4202 (diff)
Merge branch 'master' of github.com:jellyfin/jellyfin into nfo-watched
Diffstat (limited to 'MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs')
-rw-r--r--MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs
index 4a87f87dc..ccef7eeea 100644
--- a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs
+++ b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs
@@ -79,7 +79,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
subEvent.Text = string.Join(ParserValues.NewLine, multiline);
subEvent.Text = subEvent.Text.Replace(@"\N", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase);
- subEvent.Text = Regex.Replace(subEvent.Text, @"\{(?:\\\d?[\w.-]+(?:\([^\)]*\)|&H?[0-9A-Fa-f]+&|))+\}", string.Empty, RegexOptions.IgnoreCase);
+ subEvent.Text = Regex.Replace(subEvent.Text, @"\{(?:\\[0-9]?[\w.-]+(?:\([^\)]*\)|&H?[0-9A-Fa-f]+&|))+\}", string.Empty, RegexOptions.IgnoreCase);
subEvent.Text = Regex.Replace(subEvent.Text, "<", "&lt;", RegexOptions.IgnoreCase);
subEvent.Text = Regex.Replace(subEvent.Text, ">", "&gt;", RegexOptions.IgnoreCase);
subEvent.Text = Regex.Replace(subEvent.Text, "&lt;(\\/?(font|b|u|i|s))((\\s+(\\w|\\w[\\w\\-]*\\w)(\\s*=\\s*(?:\\\".*?\\\"|'.*?'|[^'\\\">\\s]+))?)+\\s*|\\s*)(\\/?)&gt;", "<$1$3$7>", RegexOptions.IgnoreCase);