remove FORM FEED and ESC from sent data
This commit is contained in:
parent
9991a13dcc
commit
acdb712838
|
@ -21,7 +21,8 @@ import xml.parsers.expat
|
|||
|
||||
def XMLescape(txt):
|
||||
"""Returns provided string with symbols & < > " replaced by their respective XML entities."""
|
||||
return txt.replace("&", "&").replace("<", "<").replace(">", ">").replace('"', """)
|
||||
# replace also FORM FEED and ESC, because they are not valid XML chars
|
||||
return txt.replace("&", "&").replace("<", "<").replace(">", ">").replace('"', """).replace(u'\x0C', "").replace(u'\x1B', "")
|
||||
|
||||
ENCODING='utf-8'
|
||||
def ustr(what):
|
||||
|
|
Loading…
Reference in New Issue