diff options
author | John Smith <mrdoctorwho@helldev.net> | 2018-03-16 18:06:25 +0300 |
---|---|---|
committer | John Smith <mrdoctorwho@helldev.net> | 2018-03-16 18:06:25 +0300 |
commit | b76d467348c125b11fc1d781fbd95baae437bb58 (patch) | |
tree | 2942df076915e8f5354ed04bd14b56e7d4361886 | |
parent | 503a02c16b02d39ec1aafd9ae54370f918ae3b9a (diff) |
Don't strip body after escaping
-rw-r--r-- | xmpp/simplexml.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmpp/simplexml.py b/xmpp/simplexml.py index ab2a3b4..a7a1d37 100644 --- a/xmpp/simplexml.py +++ b/xmpp/simplexml.py @@ -31,12 +31,14 @@ XML_ls = ( ("'", "'") ) +ENCODING = "utf-8" + + def XMLescape(body): for char, edef in XML_ls: body = body.replace(char, edef) - return body.strip() + return body -ENCODING = "utf-8" def ustr(what): """ |