Extended the html_encode function a bit to prepare to use it instead of Qt.escape (step 3 of Qt5 compatibility changes).

Sun, 30 Sep 2012 17:16:04 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 30 Sep 2012 17:16:04 +0200
changeset 2079
febae63bb821
parent 2078
9f4a45741622
child 2080
4b33165dd55b

Extended the html_encode function a bit to prepare to use it instead of Qt.escape (step 3 of Qt5 compatibility changes).

Utilities/__init__.py file | annotate | diff | comparison | revisions
--- a/Utilities/__init__.py	Sun Sep 30 17:04:23 2012 +0200
+++ b/Utilities/__init__.py	Sun Sep 30 17:16:04 2012 +0200
@@ -373,13 +373,14 @@
     
     return str(buffer, encoding="utf-8", errors="ignore")
 
-_escape = re.compile("[&<>\"\u0080-\uffff]")
+_escape = re.compile("[&<>\"'\u0080-\uffff]")
 
 _escape_map = {
     "&": "&amp;",
     "<": "&lt;",
     ">": "&gt;",
     '"': "&quot;",
+    "'": "&#x27;",
 }
 
 

eric ide

mercurial