diff --git a/src/Logic/Utilities.cs b/src/Logic/Utilities.cs index bb6e346a3..36efa5017 100644 --- a/src/Logic/Utilities.cs +++ b/src/Logic/Utilities.cs @@ -818,6 +818,13 @@ namespace Nikse.SubtitleEdit.Logic if(s.Contains("< ")) s = FixInvalidItalicTags(s); + s = RemoveSingleLetterHtmlTags(s); + s = RemoveParagraphTag(s); + return RemoveHtmlFontTag(s); + } + + private static string RemoveSingleLetterHtmlTags(string s) + { s = s.Replace("", string.Empty); s = s.Replace("<і>", string.Empty); // different unicode chars s = s.Replace("", string.Empty); @@ -832,8 +839,7 @@ namespace Nikse.SubtitleEdit.Logic s = s.Replace("", string.Empty); s = s.Replace("", string.Empty); s = s.Replace("", string.Empty); - s = RemoveParagraphTag(s); - return RemoveHtmlFontTag(s); + return s; } public static string RemoveHtmlTags(string s, bool alsoSsaTags) @@ -2490,6 +2496,8 @@ namespace Nikse.SubtitleEdit.Logic text = text.Replace("< /i>", endTag); text = text.Replace("< /i >", endTag); text = text.Replace("", endTag); + text = text.Replace("", endTag); + text = text.Replace("< / i>", endTag); text = text.Replace("< /I>", endTag); text = text.Replace("", endTag); text = text.Replace("< /I>", endTag); @@ -2590,7 +2598,7 @@ namespace Nikse.SubtitleEdit.Logic if (italicBeginTagCount == 0 && italicEndTagCount == 1) { - string cleanText = RemoveHtmlTags(text); + string cleanText = RemoveSingleLetterHtmlTags(text); bool isFixed= false; // Foo.