Merge pull request #4945 from obradovichv/fix-string-culture-specificity

This commit is contained in:
Bond-009
2021-01-09 16:21:19 +01:00
committed by GitHub
5 changed files with 108 additions and 17 deletions

View File

@@ -325,7 +325,15 @@ namespace MediaBrowser.MediaEncoding.Subtitles
text = text.Insert(start, "<font color=\"" + color + "\"" + extraTags + ">");
}
text += "</font>";
int indexOfEndTag = text.IndexOf("{\\1c}", start, StringComparison.Ordinal);
if (indexOfEndTag > 0)
{
text = text.Remove(indexOfEndTag, "{\\1c}".Length).Insert(indexOfEndTag, "</font>");
}
else
{
text += "</font>";
}
}
}
}