tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Seibert <seib...@cs.uni-bonn.de>
Subject Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardServer.java
Date Sat, 04 Jan 2003 08:37:28 GMT
Am Freitag, 03.01.03 um 20:55 Uhr schrieb Amy Roh:
> Christoph Seibert wrote:
>>>   Fix for bugzilla 15762.
>> I'm sorry I don't have a better fix right now, but I assume one
>> would have to iterate through the characters following the '&'
>> until either a ';' is found or a character occurs that is not a legal
>> part of an entity reference name (or in the case of a character
>> reference, not one of [0-9] for decimal or [0-9a-fA-F] for
>> hexadecimal).
> I believe iterating through the characters following the '&' to look 
> for ';' is found will fix the problem.  A character such as 
> '&#x0000000000020' without following ';' will result in parsing error 
> where as '&#x0000000000020;' will be written as a space(' ').

I'm sorry (really - I'm new here and already I start correcting
other people's code without having contributed any myself), but
I don't think this is sufficient. On encountering a string like

'I like to spell & as &amp;'

your solution would treat '& as &amp;' as a valid entity
reference, and would not escape the first '&' character.

However, please also see my answer to Roberto's mail before
making another change.

Ciao,
Christoph

-- 
--- Christoph Seibert                   seibert@cs.uni-bonn.de ---
-- Farlon Dragon -==(UDIC)==-    http://home.pages.de/~seibert/ --
- Who can possibly rule if no one                                -
-         who wants to can be allowed to?     - D. Adams, HHGTTG -


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message