DEV Community

[Comment from a deleted post]
Collapse
 
ben profile image
Ben Halpern

What might post-HTML look like?

Collapse
 
andrewlucker profile image
Andrew Lucker • Edited

React style DOM declarations and further in that direction the eventually web assembly random frameworks.

We will still have DOM, but the angle brackets syntax might die. Probably there will be an option to "export as XML", but even the original HTML document might go away or change significantly in scope. head information will always be important, but body is definitely going to be deprecated.

PS: your HTML sanitization is weird.

 
andy profile image
Andy Zhao (he/him)

Yeah, the sanitizer checks for some pretty edge casey stuff. Could definitely be improved though...

 
ben profile image
Ben Halpern

Andrew thanks. Feel free to make an issue if you want to go into more detail github.com/thepracticaldev/dev.to

 
andrewlucker profile image
Andrew Lucker • Edited

I tried typing head and body with angle-brackets around them. The entire tag was hidden or removed. Here is an example to see if it reproduces:

To sanitize to text, you can replace brackets with ampersand lt ; and similarly gt.

 
thejase profile image
Jason Featheringham • Edited

I'm confused in your confidence that body will definitely be deprecated. It, along with head and the document root, has always been optional.

 
andrewlucker profile image
Andrew Lucker

Yes, and ABCD is a valid http method. That doesn't mean that anyone actually does that.

"All such methods ought to be registered within the 'Hypertext Transfer Protocol (HTTP) Method Registry' maintained by IANA"