From 9a08dfc7d4320638256a58daf6e02a433f1ee91c Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 24 Jul 2012 03:25:55 -0700 Subject: Add support for using CDATA for escaping. CDATA escaping is disabled by default, but may be enabled by setting: self.use_cdata = True Closes issue #114 --- tests/test_tostring.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_tostring.py b/tests/test_tostring.py index e456d28e..cd50a7c1 100644 --- a/tests/test_tostring.py +++ b/tests/test_tostring.py @@ -1,7 +1,7 @@ from sleekxmpp.test import * from sleekxmpp.stanza import Message from sleekxmpp.xmlstream.stanzabase import ET, ElementBase -from sleekxmpp.xmlstream.tostring import tostring, xml_escape +from sleekxmpp.xmlstream.tostring import tostring, escape class TestToString(SleekTest): @@ -30,7 +30,7 @@ class TestToString(SleekTest): def testXMLEscape(self): """Test escaping XML special characters.""" original = """'Hi & welcome!'""" - escaped = xml_escape(original) + escaped = escape(original) desired = """<foo bar="baz">'Hi""" desired += """ & welcome!'</foo>""" -- cgit v1.2.3