Hacker News new | ask | show | jobs
by Dylan16807 315 days ago
To me, escaping < for web stuff is just as non-arcane and non-nuanced as base64.

And yeah use URL-safe base64 when you do use it. -_ with no padding.

1 comments

Yeah, that's fair, and I did forget about `=`/padding when I discussed base64. This instance is a solved problem with a simple solution, blessed by the standards body.

The advantage of the base64 technique is that it provides fewer degrees of freedom, and so is more robust to unforseen vectors of attack. It's defensive programming. But it comes at a cost of memory/bandwidth.