News for hackers. Stuff that matters.
Re:It’s time to kill the web app by an_account on Saturday September 23, 2017 @05:22PM (#15321795)
If you can say, “the next 450 characters are plain text and should be rendered as such”, then even if the text includes script tags (or whatever), they won’t be parsed or executed.
Re:It’s time to kill the web app by SwellJoe on Saturday September 23, 2017 @05:56PM (#15321980)
This seems like an argument for strong types. Which is reasonable. But, one could do that with closing tags, too. We already know that relying on a programmer to specify the length of data is prone to bugs (C/C++). And, you can't trust the client to specify the length of data.

I feel like this is conflating two different problems and potential solutions.

I'm not saying injection attacks aren't real. I'm saying that whether HTML uses closing tags or not is orthogonal to the solution. But, again, maybe I'm missing something obvious here. I just don't see how what you're suggesting can be done without types and I don't see how types require prefixing data size in order to work.

Re:It’s time to kill the web app by zaroth on Saturday September 23, 2017 @08:46PM (#15322617)
There is a .innerText property which works perfectly fine for this if you want to ship your content inside JSON and then plug it in...