Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It can be argued that constricting HTML using string manipulation is the right way, because HTML is defined in terms of strings. Alternatively, HTML standart leaves generation as an exercise to the reader.


Every output can be said to be "defined in terms of strings"

Get real, the whole point is some strings in HTML are HTML, and some are malicious code.

You're being adversarial to equate the two.


I am not making a point about "HTML uses strings", but calling out the lack of separation between encoding and logical structure in the standart. Just for example, and sorry for mentioning it, but ASN.1 with its encoding rules provides terminology and a way to talk about encoding and semantics, so library writers do not have to reinvent it. Or, say, you want to generate some C++ code — what options except string templates do you even have? Standart does not help you to understand how to represent and encode senantics of a c++ source.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: