[rkward-cvs] SF.net SVN: rkward-code:[4968] trunk/rkward/scripts/extract_plugin_messages .py
tfry at users.sf.net
tfry at users.sf.net
Tue Oct 28 09:51:40 UTC 2014
Revision: 4968
http://sourceforge.net/p/rkward/code/4968
Author: tfry
Date: 2014-10-28 09:51:39 +0000 (Tue, 28 Oct 2014)
Log Message:
-----------
Make sure to unescape xml character entities. Qt does so, too, while parsing the xml.
Modified Paths:
--------------
trunk/rkward/scripts/extract_plugin_messages.py
Modified: trunk/rkward/scripts/extract_plugin_messages.py
===================================================================
--- trunk/rkward/scripts/extract_plugin_messages.py 2014-10-27 21:00:57 UTC (rev 4967)
+++ trunk/rkward/scripts/extract_plugin_messages.py 2014-10-28 09:51:39 UTC (rev 4968)
@@ -7,6 +7,7 @@
import os.path
import os
from xml.dom import minidom
+import HTMLParser
import copy
def usage ():
@@ -74,6 +75,7 @@
return (ret + ' '.join (tag_stack) + refer_to)
def quote (text):
+ text = HTMLParser.HTMLParser ().unescape (text) # unescape character entities, Qt does so while parsing the xml
return "\"" + text.replace ("\\", "\\\\").replace ("\"", "\\\"") + "\""
# Normalizes larger text fragments. TODO: Do we want to protect <pre>-blocks?
More information about the rkward-tracker
mailing list