cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dylan Walsh <Dylan.Wa...@Kadius.com>
Subject Big XSP Problem with backslashes or double quotes in attribute va lues.
Date Fri, 12 Jan 2001 15:05:30 GMT
XSP has a problem if there is a &quot; entity reference or there is a
backslash ("\") in an attribute value, in the source XML.

For example:
title="Win a 28&quot; TV!"

This is completely legal XML, but XSP reports an error.

We are using XSP with Java, and I suspect that XSP is not escaping the
quotes in the Java files it generates for the page. Both double qoutes and
backslashes must be escaped in Java code by placing a backslash before them.
This problem does not occur if these characters appear in element content,
it only happens with attribute values. There is a mention of escaping in the
list of changes in Cocoon, but it seems not to have been done for attribute
values. We are using 1.7.4 but it also affects 1.8. 

Does anyone know a fix for this problem, as it is a headache? The bug
tracker is down, so I couldn't log the bug, so perhaps the developers could
note this issue.

Here is an example error:

java.lang.Exception: XSP Java Compiler: Compilation failed for _10_10.java
1024: ')' expected.

      "Win a 28" TV!"

                       ^
1024: String not terminated at end of line. 


Mime
View raw message