cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Re: Entity escaping in o.a.c.c.serializers.XHTMLSerializer
Date Thu, 22 Jan 2009 11:52:13 GMT
Andreas Hartmann schrieb:
> Andreas Hartmann schrieb:
>> The XHTMLSerializer, or, more specifically, the XHMLEncoder, from the 
>> serializers block in Cocoon 2.1.x escapes all characters with a 
>> corresponding HTML 4.0 character entity reference into this entity 
>> reference. This causes issues with inline JavaScript, since e.g. the 
>> double quotes are transformed to &quot; which causes a JavaScript 
>> parsing error. Another minor negative effect is the increased document 
>> size.
> 
> I just tried to use the XMLEncoder instead, but it also inserts the 
> entities &quot; and &apos;. Is there a particular reason for this 
> behaviour?

I filed a bug and attached a patch:

   https://issues.apache.org/jira/browse/COCOON-2249

Do you think that it makes sense to apply the patch? If not, is there a 
better solution (apart from using the HTMLSerializer instead, which 
means that the XHTMLSerializer is considered unusable – IMO this would 
send a rather negative signal)?

-- Andreas




-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


Mime
View raw message