Menu

#40 XML parser does not properly handle non-english characters

open
nobody
XML Parser (2)
5
2007-08-14
2007-08-14
No

The XML parser does not handle non-english characters where it expects a "name". The source of the bug is this function (XMLParserCore.cpp):

inline bool isNameChar(char c)
{
return isalnum(c) || c == '_' || c == '-' ||
c == ':' || c == '.';
}

This function is wrong. The specification says it is:
Name ::= (Letter | '_' | ':') (NameChar)*

Where "Letter" is a character from a huge list -- not just ASCII and surely not locale-dependent as isalnum() acts. See http://www.w3.org/TR/2006/REC-xml-20060816/#NT-Name and http://www.w3.org/TR/2006/REC-xml-20060816/#NT-Letter .

Discussion


Log in to post a comment.