[Zope-Checkins] CVS: Zope2 - HTTPRequest.py:1.43.2.9
fred@digicool.com
fred@digicool.com
Thu, 7 Jun 2001 11:00:45 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/ZPublisher
In directory korak.digicool.com:/tmp/cvs-serv15748/ZPublisher
Modified Files:
Tag: zope-2_3-branch
HTTPRequest.py
Log Message:
Remove unused import of string.atoi().
html_quote():
Use string.replace() instead of string.find()/.split()/.join().
--- Updated File HTTPRequest.py in package Zope2 --
--- HTTPRequest.py 2001/05/31 16:52:01 1.43.2.8
+++ HTTPRequest.py 2001/06/07 15:00:44 1.43.2.9
@@ -86,7 +86,7 @@
__version__='$Revision$'[11:-2]
import regex, re, sys, os, string, urllib, time, whrandom
-from string import lower, atoi, rfind, split, strip, join, upper, find
+from string import lower, rfind, split, strip, join, upper, find, replace
from BaseRequest import BaseRequest
from HTTPResponse import HTTPResponse
from cgi import FieldStorage
@@ -1025,7 +1025,7 @@
(('"'), '"'))): #"
text=str(value)
for re, name in character_entities:
- if find(text, re) >= 0: text=join(split(text, re), name)
+ text = replace(text, re, name)
return text