Fixed issue with format "Translation Memory xml" and "&" char - thx ivandrofly :)

This commit is contained in:
Nikolaj Olsson 2016-06-12 09:02:58 +02:00
parent b156592432
commit 210bac40b7

View File

@ -73,9 +73,12 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
string innerXml = paragraphInnerXml;
innerXml = innerXml.Replace("[START]", p.StartTime.ToString());
innerXml = innerXml.Replace("[END]", p.EndTime.ToString());
innerXml = innerXml.Replace("[TEXT]", p.Text.Replace(Environment.NewLine, "<br />"));
paragraph.InnerXml = innerXml;
XmlNode textNode = paragraph.SelectSingleNode("tuv/seg");
textNode.InnerText = HtmlUtil.RemoveHtmlTags(p.Text, true);
textNode.InnerXml = textNode.InnerXml.Replace(Environment.NewLine, "<br />");
body.AppendChild(paragraph);
count++;
}