3 ms·
This is not handling HTML entities properly, which does a number on my own site where various hrefs have slashes escaped as / because Zola has taken the OWASP g
by chrismorgan 6y ago
This is not handling HTML entities properly, which does a number on my own site where various hrefs have slashes escaped as / because Zola has taken the OWASP guidelines on the topic of escaping which erroneously instruct to escape forward slash, and I haven’t been bothered to undo this. So almost all my links are broken. And as for my article title <_>::v::<_>…
(The OWASP thing: https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Sc..., “the forward slash is included as it helps to end an HTML entity”. This is wrong, and slash escaping is 100% stupid; this was related to an SGML feature that I don’t believe ever made it into any HTML parsers, or past HTML 3.2 at the latest, and even if it were so it would still be a stupid guideline because if a character’s entity-ending behaviour matters then (a) you’re doing something catastrophically wrong, and (b) you should be entity-encoding every non-alphanumeric character. But people have been blindly copying what OWASP says here for at least ten years and making things worse for the sake of it, e.g. https://github.com/rack/rack/issues/27 https://github.com/rack/rack/issues/27. Perhaps I should try again to see if I can figure out how to get them to fix this bad guideline. I think it’s probably five years since I last tried and failed; I might be more successful in finding the place to complain nowadays, looks like the source might be hosted on GitHub now.)