@@ -228,11 +228,11 @@ def htmlquote(text):
228228 >>> htmlquote(u"<'&\">")
229229 u'<'&">'
230230 """
231- text = text .replace (u "&" , u "&" ) # Must be done first!
232- text = text .replace (u "<" , u "<" )
233- text = text .replace (u ">" , u ">" )
234- text = text .replace (u "'" , u "'" )
235- text = text .replace (u '"' , u """ )
231+ text = text .replace ("&" , "&" ) # Must be done first!
232+ text = text .replace ("<" , "<" )
233+ text = text .replace (">" , ">" )
234+ text = text .replace ("'" , "'" )
235+ text = text .replace ('"' , """ )
236236 return text
237237
238238
@@ -243,11 +243,11 @@ def htmlunquote(text):
243243 >>> htmlunquote(u'<'&">')
244244 u'<\'&">'
245245 """
246- text = text .replace (u """ , u '"' )
247- text = text .replace (u "'" , u "'" )
248- text = text .replace (u ">" , u ">" )
249- text = text .replace (u "<" , u "<" )
250- text = text .replace (u "&" , u "&" ) # Must be done last!
246+ text = text .replace (""" , '"' )
247+ text = text .replace ("'" , "'" )
248+ text = text .replace (">" , ">" )
249+ text = text .replace ("<" , "<" )
250+ text = text .replace ("&" , "&" ) # Must be done last!
251251 return text
252252
253253
@@ -263,7 +263,7 @@ def websafe(val):
263263 True
264264 """
265265 if val is None :
266- return u ""
266+ return ""
267267
268268 if isinstance (val , bytes ):
269269 val = val .decode ("utf-8" )
0 commit comments