What to do about newlines in attribute values?

On Thu, Sep 13, 2012 at 12:07 PM, Liam R E Quin <liam@w3.org> wrote:

>
> It might be better to forbid newlines in attributes.


That's an interesting suggestion. Every option has its problems:

a) allow newlines but normalizes to spaces (as XML): compatible with XML,
but leaves MicroXML with ugly and surprising

b) disallow literal newlines: compatible with XML; users can still include
newlines using numeric character references; possibly better error
recovering when a closing quote is missing; maybe a surprising limitation,
but then again lots of programming languages don't allow literal newlines
in string literals

c) allow newlines but don't normalize them: most useful behaviour but
incompatible with XML

Currently the spec has (c), but I can see definite advantages to (b).

Opinions?

James

Received on Thursday, 13 September 2012 06:36:54 UTC