W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2006

[whatwg] Allow trailing slash in always-empty HTML5 elements?

From: Simon Pieters <zcorpan@hotmail.com>
Date: Thu, 30 Nov 2006 15:19:20 +0000
Message-ID: <BAY109-F3988E8DB6AD4505D9059EEB4DB0@phx.gbl>
Hi,

From: Ian Hickson <ian@hixie.ch>
>I think basically the argument is "it would help people" and the counter
>argument is "it would confuse people". We need evidence to back up these
>arguments so we can make a solid decision. The only relevant data I have
>is that 50% of the web uses trailing slashes, and only 17% uses XHTML.
>This could be used to back up either argument: "clearly people think that
>trailing slashes are allowed, so we should allow them", and "clearly
>people are confused about trailing slashes, so we should get rid of them
>altogether". I don't know which is best.

Previously I thought trailing slashes should be disallowed in HTML5, mostly 
because it means something different in SGML using the SGML declaration for 
HTML4. But now we don't care about compatibility with SGML, so this point is 
irrelevant.

If we disallow it, authors who use tag soup systems that emit "XHTML" today 
and want to convert to HTML5 will probably just do a search and replace 
either in the files directly or with a script before serving. Such string 
substitution is not safe because it might lead to /> being replaced with > 
in other places than intended, e.g. in comments, attribute values, style 
sheets, scripts, content, XML files, etc. Additionally, replacing /> with > 
even if done carefully or safely does not add any value, because it is 
already handled interoperably. That this has happened on blog.whatwg.org is 
not an isolated example; I've seen XHTML to HTML4 scripts using string 
substitution all over the place -- I've even written one myself in the past 
-- and they are completely useless because they require that the input 
already works as text/html without any conversion.

So now I'm starting to think that trailing slashes for void elements should 
be allowed in HTML5.

Regards,
Simon Pieters

_________________________________________________________________
Facklor och eldar i tr?dg?rden http://alltombostad.msn.se/
Received on Thursday, 30 November 2006 07:19:20 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:50 UTC