We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b3d62d commit 60e1b9dCopy full SHA for 60e1b9d
1 file changed
werobot/parser.py
@@ -1,5 +1,6 @@
1
# -*- coding: utf-8 -*-
2
3
+import re
4
import xmltodict
5
from werobot.messages.messages import MessageMetaClass, UnknownMessage
6
from werobot.messages.events import EventMetaClass, UnknownEvent
@@ -11,7 +12,8 @@ def parse_user_msg(xml):
11
12
13
14
def parse_xml(text):
- xml_dict = xmltodict.parse(text)["xml"]
15
+ text_clean = re.sub(b'[\x00-\x1F]', b'', text)
16
+ xml_dict = xmltodict.parse(text_clean)["xml"]
17
xml_dict["raw"] = text
18
return xml_dict
19
0 commit comments