|
|
|
|
|
by dmsnell
505 days ago
|
|
Fun fact: this is very close but slightly inaccurate. I used to think this is how it worked before scrutinizing a rule in the HTML tree-building specification. The tag leads the parser to interpret everything following it as character data, but doesn’t impact rendering. In these cases, if there are active formatting elements that would normally be reconstructed, they will after the PLAINTEXT tag as well. It’s quite unexpected. <a href="https://news.ycombinator.com"><b><i><u><s><plaintext>hi
In this example “hi” will render with every one of the preceding formats applied.https://software.hixie.ch/utilities/js/live-dom-viewer/?%3Ca... After I discovered this the note in the spec was updated to make it clearer. https://html.spec.whatwg.org/multipage/parsing.html#:~:text=A start tag whose tag name is "plaintext"
|
|