summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Alburquerque <jaalburqu@svn.gnome.org>2010-04-13 12:28:10 -0400
committerJosé Alburquerque <jaalburqu@svn.gnome.org>2010-04-13 12:31:37 -0400
commitbd4e7f2459e34957aaae59b9be807d6dff5ec1eb (patch)
tree777d341ff07f74978ea17b60b70edcdccaa3b1f6
parentf00b9ce91fc9c3aabd4af4132fc112d9e415e12e (diff)
downloadpygobject-bd4e7f2459e34957aaae59b9be807d6dff5ec1eb.tar.gz
pygobject-bd4e7f2459e34957aaae59b9be807d6dff5ec1eb.tar.xz
pygobject-bd4e7f2459e34957aaae59b9be807d6dff5ec1eb.zip
codegen/docextract_to_xml.py: Replace some &..; that cause errors.
* codegen/docextract_to_xml.py (escape_text): Replace some &..; expressions that cause errors with more appropriate output.
-rwxr-xr-xcodegen/docextract_to_xml.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/codegen/docextract_to_xml.py b/codegen/docextract_to_xml.py
index 0e6daa1..a219e17 100755
--- a/codegen/docextract_to_xml.py
+++ b/codegen/docextract_to_xml.py
@@ -34,6 +34,10 @@ def escape_text(unescaped_text):
escaped_text = string.replace(escaped_text, '&ast;', '*')
escaped_text = string.replace(escaped_text, '&percnt;', '%')
escaped_text = string.replace(escaped_text, '&commat;', '@')
+ escaped_text = string.replace(escaped_text, '&num;', '')
+ # This represents a '/' before or after an '*' so replace with slash but
+ # with spaces.
+ escaped_text = string.replace(escaped_text, '&sol;', ' / ')
# Escape for both tag contents and attribute values
escaped_text = string.replace(escaped_text, '<', '&lt;')