[whatwg] [wf2] Note about XML attribute value handling

Mikko Rantalainen mikko.rantalainen at peda.net
Tue May 10 13:49:57 PDT 2005


Anne van Kesteren wrote:
> Could we perhaps make a note about this in the WF2 specification:
>   <http://www.w3.org/TR/REC-xml/#AVNormalize>
> 
> Preferably somewhere close to <input type=hidden>. My weblog used to run 
> on XHTML and previewed weblog comments where stored inside the VALUE 
> attribute of a hiddenINPUT element (actually, that is still the case). 
> As XHTML means the above mentioned XML rule applies all formatting got 
> lost. That was a major problem for white-space significant replies. 
> (Replies using the PRE element.)

<input type="hidden"> works just fine with existing UAs even when one 
uses application/xhtml+xml provided that all meaningful whitespace has 
been converted to entities. 
 for LF, 
 for CR and so on. PHP, 
for example, provides function htmlentities() exactly for this purpose.

It would be nice to have a note about that somewhere in the spec. I too 
found it hard way.

-- 
Mikko



More information about the whatwg mailing list