Permalink
Browse files

fix XSLT serialisation error for Unicode string output

  • Loading branch information...
1 parent d829718 commit 5b0b3d62077a3309350da20b7e89deb448ec1fe9 @scoder scoder committed Mar 29, 2013
Showing with 4 additions and 1 deletion.
  1. +3 −0 CHANGES.txt
  2. +1 −1 src/lxml/apihelpers.pxi
View
@@ -11,6 +11,9 @@ Features added
Bugs fixed
----------
+* Fix serialisation error in XSLT output when converting the result tree
+ to a Unicode string.
+
* Replace illegal usage of ``xmlBufLength()`` in libxml2 2.9.0 by
properly exported API function ``xmlBufUse()``.
View
@@ -587,7 +587,7 @@ __HAS_XML_ENCODING = __RE_XML_ENCODING.match
cdef object _stripEncodingDeclaration(object xml_string):
# this is a hack to remove the XML encoding declaration from unicode
- return __REPLACE_XML_ENCODING(ur'\g<1>', xml_string)
+ return __REPLACE_XML_ENCODING(ur'\g<1> ', xml_string)
cdef bint _hasEncodingDeclaration(object xml_string):
# check if a (unicode) string has an XML encoding declaration

0 comments on commit 5b0b3d6

Please sign in to comment.