[pygobject] codegen/docextract_to_xml.py: Replace some &..; that cause errors.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] codegen/docextract_to_xml.py: Replace some &..; that cause errors.
- Date: Tue, 13 Apr 2010 16:33:10 +0000 (UTC)
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, '*', '*')
escaped_text = string.replace(escaped_text, '%', '%')
escaped_text = string.replace(escaped_text, '@', '@')
+ escaped_text = string.replace(escaped_text, '#', '')
+ # This represents a '/' before or after an '*' so replace with slash but
+ # with spaces.
+ escaped_text = string.replace(escaped_text, '/', ' / ')
# Escape for both tag contents and attribute values
escaped_text = string.replace(escaped_text, '<', '<')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]