mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Allow bad end font tag when removing formatting
This commit is contained in:
parent
c4ee7759f8
commit
119690ec51
@ -472,7 +472,9 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
}
|
||||
}
|
||||
if ((next == 'f' || next == 'F') && s.Substring(i).StartsWith("<font", StringComparison.OrdinalIgnoreCase) || // <font
|
||||
next == '/' && (nextNext == 'f' || nextNext == 'F') && s.Substring(i).StartsWith("</font>", StringComparison.OrdinalIgnoreCase)) // </font>
|
||||
next == '/' && (nextNext == 'f' || nextNext == 'F') && s.Substring(i).StartsWith("</font>", StringComparison.OrdinalIgnoreCase) || // </font>
|
||||
next == ' ' && nextNext == '/' && s.Substring(i).StartsWith("< /font>", StringComparison.OrdinalIgnoreCase) || // < /font>
|
||||
next == '/' && nextNext == ' ' && s.Substring(i).StartsWith("</ font>", StringComparison.OrdinalIgnoreCase)) // </ font>
|
||||
{
|
||||
inside = true;
|
||||
continue;
|
||||
|
@ -30609,6 +30609,22 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
s = s.Remove(endIndex, 7);
|
||||
}
|
||||
else
|
||||
{
|
||||
endIndex = s.IndexOf("< /font>", match.Index - 5, StringComparison.OrdinalIgnoreCase);
|
||||
if (endIndex >= 0)
|
||||
{
|
||||
s = s.Remove(endIndex, 7);
|
||||
}
|
||||
else
|
||||
{
|
||||
endIndex = s.IndexOf("</ font>", match.Index - 5, StringComparison.OrdinalIgnoreCase);
|
||||
if (endIndex >= 0)
|
||||
{
|
||||
s = s.Remove(endIndex, 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (s.Length > match.Index + 1 && s[match.Index + 1] == '>')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user