ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: bug in DOMElementWriter
Date Mon, 28 Jun 2010 09:03:32 GMT
On 2010-06-28, Stefan Bodewig wrote:

> [just echoing what Antoine and Dominque already said, Ant doesn't even
>       know you used an entity reference to specify the newline.]

Just read <> and
realized that what I said above isn't true.

If Ant sees a \n, \r or \t inside an attribute's value, then it must
have been an entity reference in the original input - otherwise
normalization would have replaced it with a space.

This also means

>> <foo attr="beforenewline&#10;afternewline">


>> <foo attr="beforenewline
>> afternewline" />

result in different attribute values being passed to the application
(one containing the newline and one containing a space instead).

By now I tend to agree with Jon that DOMElementWriter should encode \n,
\r and \t when writing attribute values (and only when writing attribute


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message