demos/rlzope/rlzope.py
branchpy33
changeset 3794 398ea04239b5
parent 3721 0c93dd8ff567
child 3848 86095f63b397
--- a/demos/rlzope/rlzope.py	Tue Nov 19 12:21:04 2013 +0000
+++ b/demos/rlzope/rlzope.py	Tue Nov 19 13:50:34 2013 +0000
@@ -12,7 +12,7 @@
 #
 #
 
-import string, io
+import io
 try :
     from Shared.reportlab.platypus.paragraph import Paragraph
     from Shared.reportlab.platypus.doctemplate import *
@@ -123,10 +123,10 @@
 
     def escapexml(self, s) :
         """Escape some xml entities."""
-        s = string.strip(s)
-        s = string.replace(s, "&", "&")
-        s = string.replace(s, "<", "&lt;")
-        return string.replace(s, ">", "&gt;")
+        s = s.strip()
+        s = s.replace("&", "&amp;")
+        s = s.replace("<", "&lt;")
+        return s.replace(">", "&gt;")
 
 def rlzope(self) :
     """A sample external method to show people how to use ReportLab from within Zope."""