Do not traceback when receiving malformed XML in a xhtml-im body
This commit is contained in:
parent
9e8860cd6a
commit
834546ac77
1 changed files with 5 additions and 1 deletions
|
@ -227,7 +227,11 @@ def ncurses_color_to_html(color):
|
|||
|
||||
def xhtml_to_poezio_colors(xml):
|
||||
if isinstance(xml, str):
|
||||
try:
|
||||
xml = ET.fromstring(xml)
|
||||
except cElementTree.ParserError as e:
|
||||
log.error("Error decoding XML: [%s] (%s)" % (xml, e))
|
||||
return ""
|
||||
def parse_css(css):
|
||||
def get_color(value):
|
||||
if value[0] == '#':
|
||||
|
|
Loading…
Reference in a new issue