def urlEncode(s): """Quotes special characters using the % substitutions. This method does the same as the `urllib.quote_plus()` function. """ return Funcs.urlEncode(s) # we could also use urllib.quote
def urlEncode(self, s): """Alias for `WebUtils.Funcs.urlEncode`. Quotes special characters using the % substitutions. """ # @@: urllib.quote, or return Funcs.urlEncode(s)
def testUrlRoundTrip(self): t = '<test>\n\t"50% = 50,50?"\n</test>' self.assertEqual(Funcs.urlDecode(Funcs.urlEncode(t)), t)
def urlEncode(self, s): return Funcs.urlEncode(s)