diff --git a/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs b/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs index 7c1757f..e23f8f1 100644 --- a/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs +++ b/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs @@ -30,6 +30,8 @@ namespace Mp4SubtitleParser public partial class MP4TtmlUtil { + [GeneratedRegex(" \\w+:\\w+=\\\"[^\\\"]*\\\"")] + private static partial Regex AttrRegex(); [GeneratedRegex("
{m.Groups[1].Value}
"); + var inner = m.Groups[1].Value; + if (attrRegex.IsMatch(inner)) + { + inner = attrRegex.Replace(inner, ""); + } + new XmlDocument().LoadXml($"{inner}
"); } catch (Exception) {