cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18900] New: - [ESQL] Multibyte chars in esql:query are not escaped
Date Thu, 10 Apr 2003 14:48:48 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18900>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18900

[ESQL] Multibyte chars in esql:query are not escaped

           Summary: [ESQL] Multibyte chars in esql:query are not escaped
           Product: Cocoon 2
           Version: 2.0.4
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: general components
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: tnowak-p@netventure.pl


Multibyte chars in esql:query are not escaped! Try this:

      <esql:query>
        INSERT INTO data (id, name, value) VALUES ('2', 'imie', '')
      </esql:query>

This is translated via esql.xsl to such .java code:
INSERT INTO data (id, name, value) VALUES ('1', 'imie', '???')"

Should this should look like this:
INSERT INTO data (id, name, value) VALUES ('1', 'imie', '\u0105\u015B\u0107')"

That happens becasue query string is not escaped in this esql.xsl statment:
_esql_query = new EsqlQuery( _esql_connection, String.valueOf(<xsl:copy-of 
select="$query"/>) );

just like other text() is in xsp.xsl:
this.characters("<xsl:value-of select="XSLTExtension:escape($extension, .)"/>");

Is there any simple workaround for this bug? (without modifying distribution's 
esql.xsp). BTW: is there any reason .java files are not utf native?

Mime
View raw message