3 ms·
Is it reading the web page, parsing it into an AST, sanitizing the AST, then writing it out? I have a similar function on my site: https://roastidio.us https://
by derekzhouzhen 4y ago
Is it reading the web page, parsing it into an AST, sanitizing the AST, then writing it out? I have a similar function on my site: https://roastidio.us https://roastidio.us
There are 2 caveats:
* There are broken HTML files that somehow still work with a browser.
* There are web pages that rely on javascript even for the main text.
- Hackbraten 4y ago* With (legacy) HTML being one of the most complex things to parse, that AST-parsing step poses an increased attack surface. Trying to mitigate that risk might keep cost of operating this service high in the long run.