2020__docformat__ = 'restructuredtext'
2121
2222
23- import cgi , urllib , re , os .path , mimetypes , csv , string
23+ import cgi , re , os .path , mimetypes , csv , string
2424import calendar
2525import textwrap
2626import time , hashlib
2727
28+ from roundup .anypy import urllib_
2829from roundup import hyperdb , date , support
2930from roundup import i18n
3031from roundup .i18n import _
@@ -763,7 +764,7 @@ def classhelp(self, properties=None, label=''"(list)", width='500',
763764 for x in filterprops :
764765 (name , values ) = x .split ('=' )
765766 names .append (name )
766- filtervalues .append ('&%s=%s' % (name , urllib .quote (values )))
767+ filtervalues .append ('&%s=%s' % (name , urllib_ .quote (values )))
767768 filter = '&@filter=%s%s' % (',' .join (names ), '' .join (filtervalues ))
768769 else :
769770 filter = ''
@@ -1199,7 +1200,7 @@ def renderQueryForm(self):
11991200 req .classname = self ._klass .get (self ._nodeid , 'klass' )
12001201 name = self ._klass .get (self ._nodeid , 'name' )
12011202 req .updateFromURL (self ._klass .get (self ._nodeid , 'url' ) +
1202- '&@queryname=%s' % urllib .quote (name ))
1203+ '&@queryname=%s' % urllib_ .quote (name ))
12031204
12041205 # new template, using the specified classname and request
12051206 # [ ] the custom logic for search page doesn't belong to
@@ -1219,7 +1220,7 @@ def download_url(self):
12191220 """
12201221 name = self ._klass .get (self ._nodeid , 'name' )
12211222 url = '%s%s/%s' % (self ._classname , self ._nodeid , name )
1222- return urllib .quote (url )
1223+ return urllib_ .quote (url )
12231224
12241225 def copy_url (self , exclude = ("messages" , "files" )):
12251226 """Construct a URL for creating a copy of this item
@@ -1246,7 +1247,7 @@ def copy_url(self, exclude=("messages", "files")):
12461247 query [name ] = "," .join (self ._klass .get (self ._nodeid , name ))
12471248
12481249 return self ._classname + "?" + "&" .join (
1249- ["%s=%s" % (key , urllib .quote (value ))
1250+ ["%s=%s" % (key , urllib_ .quote (value ))
12501251 for key , value in query .items ()])
12511252
12521253class _HTMLUser (_HTMLItem ):
@@ -1463,7 +1464,7 @@ def _hyper_repl_rst(self, match):
14631464
14641465 def url_quote (self ):
14651466 """ Return the string in plain format but escaped for use in a url """
1466- return urllib .quote (self .plain ())
1467+ return urllib_ .quote (self .plain ())
14671468
14681469 def hyperlinked (self ):
14691470 """ Render a "hyperlinked" version of the text """
@@ -2855,7 +2856,7 @@ def indexargs_url(self, url, args):
28552856 dispname otherwise the parameter will be omitted
28562857 from the url.
28572858 """
2858- q = urllib .quote
2859+ q = urllib_ .quote
28592860 sc = self .special_char
28602861 l = ['%s=%s' % (k ,isinstance (v , basestring ) and q (v ) or v )
28612862 for k ,v in args .items () if v != None ]
@@ -3069,7 +3070,7 @@ def anti_csrf_nonce(self, lifetime=None):
30693070
30703071 def url_quote (self , url ):
30713072 """URL-quote the supplied text."""
3072- return urllib .quote (url )
3073+ return urllib_ .quote (url )
30733074
30743075 def html_quote (self , html ):
30753076 """HTML-quote the supplied text."""
0 commit comments