ThosRTanner / inforss

Newsreader for Palemoon browser
Mozilla Public License 2.0
8 stars 0 forks source link

Review use of htmlFormatConvert #331

Open ThosRTanner opened 1 year ago

ThosRTanner commented 1 year ago

What this does is

  1. Convert < and > to 'unlikely to occur' strings
  2. run an undocumented function to convert from text/html to text/unicode mime types
  3. undo the 1st conversion

I think we just want to convert utf8 to unicode ? is there an equivalent. the replacing of < and > and then unreplacing them does have dangers.

It is also worth noting that anything coming in from atom/rss feeds has already been through TextDecoder. It is likely that html scraping has also been treated like that (needs checking), so it is likely to be only useful for NNTP feeds (which should be utf8) - and that could probably also use the TextDecoder method.