Example #1
0
    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
Example #2
0
	def urlEncode(self, s):
		"""Alias for `WebUtils.Funcs.urlEncode`.

		Quotes special characters using the % substitutions.

		"""
		# @@: urllib.quote, or
		return Funcs.urlEncode(s)
Example #3
0
    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
Example #4
0
 def testUrlRoundTrip(self):
     t = '<test>\n\t"50% = 50,50?"\n</test>'
     self.assertEqual(Funcs.urlDecode(Funcs.urlEncode(t)), t)
Example #5
0
 def urlEncode(self, s):
     return Funcs.urlEncode(s)
Example #6
0
 def testUrlRoundTrip(self):
     t = '<test>\n\t"50% = 50,50?"\n</test>'
     self.assertEqual(Funcs.urlDecode(Funcs.urlEncode(t)), t)