diff --git a/gen/wrappers/__init__.py b/gen/wrappers/__init__.py index e7f428b..ecc4848 100644 --- a/gen/wrappers/__init__.py +++ b/gen/wrappers/__init__.py @@ -192,7 +192,7 @@ class AbstractWrapper(object): - + @@ -259,7 +259,7 @@ class AbstractWrapper(object): - +
:obj.pxNavigationStrip
diff --git a/shared/xml_parser.py b/shared/xml_parser.py index cce7014..b378d06 100644 --- a/shared/xml_parser.py +++ b/shared/xml_parser.py @@ -40,6 +40,8 @@ CUSTOM_CONVERSION_ERROR = 'Custom converter for "%s" values produced an ' \ 'error while converting value "%s". %s' XML_SPECIAL_CHARS = {'<': '<', '>': '>', '&': '&', '"': '"', "'": '''} +XML_SPECIAL_CHARS_NO_APOS = XML_SPECIAL_CHARS.copy() +del XML_SPECIAL_CHARS_NO_APOS["'"] XML_ENTITIES = {'lt': '<', 'gt': '>', 'amp': '&', 'quot': '"', 'apos': "'"} HTML_ENTITIES = { 'iexcl': '¡', 'cent': '¢', 'pound': '£', 'curren': '€', 'yen': '¥', @@ -81,8 +83,9 @@ def escapeXml(s, format='xml', nsText='text'): res = '' odf = format == 'odf' for c in s: - if XML_SPECIAL_CHARS.has_key(c): - res += XML_SPECIAL_CHARS[c] + if XML_SPECIAL_CHARS_NO_APOS.has_key(c): + # We do not escape 'apos': there is no particular need for that. + res += XML_SPECIAL_CHARS_NO_APOS[c] elif odf and (c == '\n'): res += '<%s:line-break/>' % nsText elif odf and (c == '\r'): @@ -99,8 +102,8 @@ def escapeXhtml(s): else: res = '' for c in s: - if XML_SPECIAL_CHARS.has_key(c): - res += XML_SPECIAL_CHARS[c] + if XML_SPECIAL_CHARS_NO_APOS.has_key(c): + res += XML_SPECIAL_CHARS_NO_APOS[c] elif c == '\n': res += '
' elif c == '\r':