Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode & string processing #159

Merged
merged 4 commits into from Feb 21, 2015
Merged

Unicode & string processing #159

merged 4 commits into from Feb 21, 2015

Conversation

@opottone
Copy link
Contributor

@opottone opottone commented Feb 21, 2015

Commits related to strings, encodings, and allowed characters.

  • Check that all strings consists of allowed XML characters (no\ufffe, \uffff, or surrogates).
  • Check that names are valid as specified in current XML standard, which is more tolerant than earlier, outdated editions (http://www.w3.org/TR/REC-xml/#NT-Name vs. http://www.w3.org/TR/2006/REC-xml-20060816/#NT-Name)
  • Python 2 expects __repr__ to return str, not unicode, and wrong type may lead to UnicodeEncodeError. Fix this.
  • Some test contained _str('ha\u1234\x07ho') or similar things. The \u escape does not work on python 2 '' string, unless we do some magic.
opottone added 4 commits Feb 21, 2015
Validate names accordingy to XML 1.0 standard fifth edition, instead of
the outdated fourth edition. (See also Namespaces in XML 1.0 third edition.)
@scoder
Copy link
Member

@scoder scoder commented Feb 21, 2015

Looks good to me, thanks!

scoder added a commit that referenced this issue Feb 21, 2015
@scoder scoder merged commit 1c04899 into lxml:master Feb 21, 2015
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants