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 4 commits into from Feb 21, 2015

Unicode & string processing #159

merged 4 commits into from Feb 21, 2015


Copy link

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 ( vs.
  • 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.

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.)
Copy link

scoder commented Feb 21, 2015

Looks good to me, thanks!

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