Repository: yt-dlp
Issue: Subtitle conversion from tt not well-formed (invalid token): line 1997, column 93
Labels: bug,core:post-processor

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I'm running yt-dlp version **2021.12.27**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Description

When attempting to convert subtitles to srt format, I get the following error: 

[SubtitlesConvertor] Converting subtitles
WARNING: You have requested to convert dfxp (TTML) subtitles into another format, which results in style information loss
ERROR: not well-formed (invalid token): line 1997, column 93


### Verbose log

```shell
[debug] Command-line config: ['-Uv', '-o', "Siwa's Dance Pop Revolution - S01E08.%(ext)s", '--ap-mso', 'Comcast_SSO', '--ap-username', 'PRIVATE', '--ap-password', 'PRIVATE', '--cookies=./cookies.txt', '--write-sub', '--sub-format', 'srt', '--convert-subs', 'srt', 'https://www.nbc.com/siwas-dance-pop-revolution/video/introducing-xomg-pop/9000217034']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2021.12.27 [6223f67a8] (zip)
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.4.0-91-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg N-58069-gc253b180cb-static (setts), ffprobe N-58069-gc253b180cb-static
[debug] Optional libraries: Crypto, secretstorage, sqlite
[debug] Proxy map: {}
Latest version: 2021.12.27, Current version: 2021.12.27
yt-dlp is up to date (2021.12.27)
[debug] [NBC] Extracting URL: https://www.nbc.com/siwas-dance-pop-revolution/video/introducing-xomg-pop/9000217034
[NBC] 9000217034: Downloading JSON metadata
[NBC] 9000217034: Downloading JSON metadata
[debug] Loading ap-mvpd.nbcentertainment from cache
[NBC] 9000217034: Retrieving Media Token
[debug] [ThePlatform] Extracting URL: http://link.theplatform.com/s/NnzsPC/media/guid/2304982139/9000217034?mbr=true&manifest=m3u&auth=%3CsignatureInfo%3EDUuSFm%2BdyOjrbN1VT6v2QgEH4mVESkBqyS9l9A2W86bPdopivmUD6uBd%2BNRw5dKf0uJTpDRz0egha4Oql11o8BjdzsXHs%2FUVHAY7cWuRX2OM%2FxciM90I79ea5ETcPT1kq7CJ85AHRAr8XZHMDZLrPWRSUYrBWheFL0w3iCs3fPY%3D%3CsignatureInfo%3E%3CauthToken%3E%3CsessionGUID%3E50bcb58764c134c37a6b1d312a9b42cb%3C%2FsessionGUID%3E%3CrequestorID%3Enbcentertainment%3C%2FrequestorID%3E%3CresourceID%3E%3C%21%5BCDATA%5B%3Crss+version%3D%222.0%22+xmlns%3Amedia%3D%22http%3A%2F%2Fsearch.yahoo.com%2Fmrss%2F%22%3E%3Cchannel%3E%3Ctitle%3Ee%3C%2Ftitle%3E%3Citem%3E%3Ctitle%3EIntroducing%2C+XOMG+POP%21%3C%2Ftitle%3E%3Cguid%3E9000217034%3C%2Fguid%3E%3Cmedia%3Arating+scheme%3D%22urn%3Av-chip%22%3ETV-PG%3C%2Fmedia%3Arating%3E%3C%2Fitem%3E%3C%2Fchannel%3E%3C%2Frss%3E%5D%5D%3E%3C%2FresourceID%3E%3Cttl%3E420000%3C%2Fttl%3E%3CissueTime%3E2021-12-29+13%3A19%3A00+-0800%3C%2FissueTime%3E%3CmvpdId%3EComcast_SSO%3C%2FmvpdId%3E%3C%2FauthToken%3E#__youtubedl_smuggle=%7B%22force_smil_url%22%3A+true%7D
[ThePlatform] 9000217034: Downloading SMIL data
[ThePlatform] 9000217034: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[ThePlatform] 9000217034: Downloading JSON metadata
[debug] Downloading subtitles: en
WARNING: No subtitle format found matching "srt" for language en, using tt
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 9000217034: Downloading 1 format(s): hls-7928
[info] Writing video subtitles to: Siwa's Dance Pop Revolution - S01E08.en.tt
[debug] Invoking downloader on "http://tve-static-eonline.akamaized.net/prod/caption/566/831/TLVOD-0000092693-GTMV0000654246-151547_Text1.tt"
[download] Siwa's Dance Pop Revolution - S01E08.en.tt has already been downloaded
[download] 100% of 280.36KiB
[SubtitlesConvertor] Converting subtitles
WARNING: You have requested to convert dfxp (TTML) subtitles into another format, which results in style information loss
ERROR: not well-formed (invalid token): line 1997, column 93
Traceback (most recent call last):
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1353, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1437, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1541, in process_ie_result
    return self.process_ie_result(
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1489, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 2551, in process_video_result
    self.process_info(new_info)
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 2835, in process_info
    info_dict, files_to_move = self.pre_process(info_dict, 'before_dl', files_to_move)
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 3225, in pre_process
    info = self.run_pp(pp, info)
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 3178, in run_pp
    files_to_delete, infodict = pp.run(infodict)
  File "/usr/local/bin/yt-dlp/yt_dlp/postprocessor/common.py", line 22, in run
    ret = func(self, info, *args, **kwargs)
  File "/usr/local/bin/yt-dlp/yt_dlp/postprocessor/ffmpeg.py", line 972, in run
    srt_data = dfxp2srt(f.read())
  File "/usr/local/bin/yt-dlp/yt_dlp/utils.py", line 3559, in dfxp2srt
    dfxp = compat_etree_fromstring(dfxp_data)
  File "/usr/local/bin/yt-dlp/yt_dlp/compat.py", line 49, in compat_etree_fromstring
    return etree.XML(text, parser=etree.XMLParser(target=_TreeBuilder()))
  File "/usr/lib/python3.8/xml/etree/ElementTree.py", line 1320, in XML
    parser.feed(text)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1997, column 93
```