mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 04:33:04 +01:00
Fix crash in TTML IMSC 1.1 - thx Louie :)
This commit is contained in:
parent
ac846d0835
commit
40a39e83ac
@ -117,8 +117,9 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
xmlTitle = "Untitled";
|
||||
}
|
||||
|
||||
xmlStructure = xmlStructure.Replace("[title]", HtmlUtil.EncodeNamed(xmlTitle));
|
||||
|
||||
var titleNode = xml.CreateElement("ttm", "title", TimedText10.TtmlMetadataNamespace);
|
||||
titleNode.InnerText = xmlTitle;
|
||||
xmlStructure = xmlStructure.Replace("[title]", titleNode.InnerXml);
|
||||
|
||||
var language = LanguageAutoDetect.AutoDetectGoogleLanguage(subtitle);
|
||||
xmlStructure = xmlStructure.Replace("lang=\"en\"", $"lang=\"{language}\"");
|
||||
|
Loading…
Reference in New Issue
Block a user