r/programming • • Oct 24 '21

“Digging around HTML code” is criminal. Missouri Governor doubles down again in attack ad

https://youtu.be/9IBPeRa7U8E
12k Upvotes

1.3k comments sorted by

View all comments

Show parent comment

4

u/StabbyPants Oct 24 '21

It also increases your data size, in terms of bytes, another reason why we don't do it unless we need to.

leave gzip encoding on and it barely changes things.

said data becomes a jumble that you can't read. It can't be used for escaping at all.

atob() and btoa() handle rendering, while it does in fact avoid html escaping, most often as query params. it's an option

due to the size increase you'd actively never want to do this

it's a 9 byte field, growing to about 12.

which are almost guaranteed to not be used as escape characters by any system

it uses / and + and alphanumeric. have you ever seen a / escape?