[pygobject] codegen/docextract_to_xml.py: Replace some &..; that cause errors.



commit bd4e7f2459e34957aaae59b9be807d6dff5ec1eb
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Tue Apr 13 12:28:10 2010 -0400

    	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.

 codegen/docextract_to_xml.py |    4 ++++
 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;')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]