Python xmlrpclib.escape() Examples

The following are 8 code examples of xmlrpclib.escape(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module xmlrpclib , or try the search function .
Example #1
Source File: test_xmlrpc.py    From ironpython2 with Apache License 2.0 5 votes vote down vote up
def test_escape(self):
        self.assertEqual(xmlrpclib.escape("a&b"), "a&b")
        self.assertEqual(xmlrpclib.escape("a<b"), "a&lt;b")
        self.assertEqual(xmlrpclib.escape("a>b"), "a&gt;b") 
Example #2
Source File: test_xmlrpc.py    From BinderFilter with MIT License 5 votes vote down vote up
def test_escape(self):
        self.assertEqual(xmlrpclib.escape("a&b"), "a&amp;b")
        self.assertEqual(xmlrpclib.escape("a<b"), "a&lt;b")
        self.assertEqual(xmlrpclib.escape("a>b"), "a&gt;b") 
Example #3
Source File: test_xmlrpc.py    From oss-ftp with MIT License 5 votes vote down vote up
def test_escape(self):
        self.assertEqual(xmlrpclib.escape("a&b"), "a&amp;b")
        self.assertEqual(xmlrpclib.escape("a<b"), "a&lt;b")
        self.assertEqual(xmlrpclib.escape("a>b"), "a&gt;b") 
Example #4
Source File: test_xmlrpc.py    From gcblue with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_escape(self):
        self.assertEqual(xmlrpclib.escape("a&b"), "a&amp;b")
        self.assertEqual(xmlrpclib.escape("a<b"), "a&lt;b")
        self.assertEqual(xmlrpclib.escape("a>b"), "a&gt;b") 
Example #5
Source File: util.py    From conary with Apache License 2.0 5 votes vote down vote up
def literalRegex(s):
    return re.escape(s)


# shutil module extensions, with {}-expansion and globbing 
Example #6
Source File: util.py    From conary with Apache License 2.0 5 votes vote down vote up
def dump_string(self, value, write, escape=xmlrpclib.escape):
        try:
            value = value.encode("ascii")
        except UnicodeError:
            sio = StringIO.StringIO()
            xmlrpclib.Binary(value).encode(sio)
            write(sio.getvalue())
            return
        return xmlrpclib.Marshaller.dump_string(self, value, write, escape) 
Example #7
Source File: test_xmlrpc.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
def test_escape(self):
        self.assertEqual(xmlrpclib.escape("a&b"), "a&amp;b")
        self.assertEqual(xmlrpclib.escape("a<b"), "a&lt;b")
        self.assertEqual(xmlrpclib.escape("a>b"), "a&gt;b") 
Example #8
Source File: test_xmlrpc.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
def test_escape(self):
        self.assertEqual(xmlrpclib.escape("a&b"), "a&amp;b")
        self.assertEqual(xmlrpclib.escape("a<b"), "a&lt;b")
        self.assertEqual(xmlrpclib.escape("a>b"), "a&gt;b")