Re:Preload, prefetch and other link tags
by ioquatix on Thursday March 21, 2019 @12:18AM
(#19449268)
Completely agree. If you want a generic parser for HTML-like tags, templates or anything where the context isn't a full HTML page, you definitely want syntactically correct/valid markup.
Re:Preload, prefetch and other link tags
by Dylan16807 on Thursday March 21, 2019 @12:59AM
(#19449372)
Too bad the closing slash doesn't do anything. <script src="..." /> will break horribly if you try to use it. Everything still depends on the whitelist.
Re:Preload, prefetch and other link tags
by sureaboutthis on Thursday March 21, 2019 @07:00AM
(#19450871)
If one needs a closing slash to be reminded which of the five or so tags are self closing, one has far more issues than needing a closing slash.
Re:Preload, prefetch and other link tags
by underwater on Friday March 22, 2019 @07:13AM
(#19461395)
My point is that not that remembering things is hard, it's that it feels like a hack. Developers gravitate to solutions that feel elegant.
Re:Preload, prefetch and other link tags
by sureaboutthis on Friday March 22, 2019 @11:20PM
(#19468856)
Putting the slash in, as I said, is there for backwards compatibility only, not elegance, and it could be removed at any time since this backwards compatibility issue no longer exists, or is of minor consequence nowadays.
It is far, far better to read and follow the standard specification and not follow a whim that makes you feel good. These are the things that will burn you first.
It's not really surprising that a developer would gravitate towards an encoding that is not dependent on maintaining a whitelist of tags, because that is the solution that intuitively feels more "correct".