Format sami - will now html-decode characters + reads class attributter a bit better

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1617 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2013-02-12 07:48:19 +00:00
parent a0d334a5fa
commit 2b874b9300

View File

@ -249,7 +249,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
var className = new StringBuilder();
int startClass = textToLower.IndexOf(" class=");
int indexClass = startClass + 7;
while (indexClass < textToLower.Length && Utilities.LowercaseLettersWithNumbers.Contains(textToLower[indexClass].ToString()))
while (indexClass < textToLower.Length && (Utilities.LowercaseLettersWithNumbers + "'\"").Contains(textToLower[indexClass].ToString()))
{
className.Append(text[indexClass].ToString());
indexClass++;
@ -359,6 +359,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
p.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + Utilities.GetOptimalDisplayMilliseconds(p.Text);
subtitle.Paragraphs.Add(p);
}
foreach (Paragraph p2 in subtitle.Paragraphs)
p2.Text = Utilities.HtmlDecode(p2.Text);
subtitle.Renumber(1);
}