When playing a video which has a transcript that contains certain formatting tags in the attached SRT files, the tags are displayed verbatim in the app without the proper styling being applied (unlike the web site which displays them correctly).
These tags are just basic style tags borrowed from HTML, see: https://en.wikipedia.org/wiki/SubRip#Formatting.
**Note: this is just an initial prototype to get the discussion out there. I don't even have a Mac handy to test this until tomorrow, so I wrote it in vim...pardon any formatting errors or failed CI builds... **
My proposal is that we utilize the convenience that UIKit's `NSAttributedString` provides by initializing it with raw data, specifying a `DocumentType` of `.html`, and get the basic bold / italic / etc styling for free.
I noticed that we basically only branch on highlighted text vs not-highlighted text, and that's as far as styling goes. Maybe we can modify `[OEXTextStyle](https://github.com/edx/edx-app-ios/blob/781cd676e23cfd49d78c7511304678df746c0b5c/Source/OEXTextStyle.h)` to take an `NSAttributedString` to sanitize however it likes.
The other option is to strip out these tags completely in `[TranscriptParser](https://github.com/edx/edx-app-ios/blob/ea5a634595155ee46ba7ec7b2c10e1cc0b62cb44/Source/TranscriptParser.swift)`, but that seems like more work and a more invasive change.
cc @marcotuts @saeedbashir Please let me know your thoughts on which approach seems best aligned with edX for the product.
How to test this PR
You will need to play a video that has a transcript file (.SRT) associated with it that contains these tags. Once we decide the approach, I can update the testing steps.
[ ] @pomegranited
[ ] edX reviewer[s] TBD