What this does is
- Convert < and > to 'unlikely to occur' strings
- run an undocumented function to convert from text/html to text/unicode mime types
- 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.
Also note how tooltip controller deals with this.
Generally a better approach would be to move the snippet parsing into the construction of the headline (or the feeds). And to make the raw version available and display that in the 'full info' tooltip.
What this does is
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.
Also note how tooltip controller deals with this.
Generally a better approach would be to move the snippet parsing into the construction of the headline (or the feeds). And to make the raw version available and display that in the 'full info' tooltip.