From 632175b79fb4d15a2358fc0604fe1bb85a076188 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 11 Nov 2011 23:55:31 +0100 Subject: Fix the xhtml parser (do not add wrong colors) --- src/xhtml.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/xhtml.py') diff --git a/src/xhtml.py b/src/xhtml.py index 99e0bf01..e7a045fa 100644 --- a/src/xhtml.py +++ b/src/xhtml.py @@ -258,7 +258,9 @@ def xhtml_to_poezio_colors(text): if key == 'background-color': pass#shell += '\x191' elif key == 'color': - shell += '\x19%d}' % get_color(value) + color = get_color(value) + if color != -1: + shell += '\x19%d}' % color elif key == 'font-style': shell += '\x19i' elif key == 'font-weight': -- cgit v1.2.3