diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-02-09 21:51:20 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-02-09 21:51:20 +0100 |
commit | d0f19e435b5a3fecb3fd74b1ba0202364e6dc545 (patch) | |
tree | a6615498d511b0fd5302b78d0a9721fdaeb46dae /src/Gui/CC_gui_functions.py | |
parent | 4df13ffe0f3b9952dcd68263fb51cac842b193b1 (diff) | |
download | abrt-d0f19e435b5a3fecb3fd74b1ba0202364e6dc545.tar.gz abrt-d0f19e435b5a3fecb3fd74b1ba0202364e6dc545.tar.xz abrt-d0f19e435b5a3fecb3fd74b1ba0202364e6dc545.zip |
GUI: escape plugin messages before using them in set_markup()
- if the messages contain tags like <foo> it would
break the markup and end-up with message like:
GtkWarning: Failed to set text from markup due to error parsing markup
Diffstat (limited to 'src/Gui/CC_gui_functions.py')
-rw-r--r-- | src/Gui/CC_gui_functions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py index 9378de52..acfd2a53 100644 --- a/src/Gui/CC_gui_functions.py +++ b/src/Gui/CC_gui_functions.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from glib import markup_escape_text import gtk import pango import subprocess @@ -66,7 +67,7 @@ def gui_report_dialog ( report_status_dict, parent_dialog, # this first one is actually a fallback to set at least # a raw text in case when set_markup() fails status_label.set_text(report_status_dict[plugin][MESSAGE]) - status_label.set_markup("<span foreground='red'>%s</span>" % report_status_dict[plugin][MESSAGE]) + status_label.set_markup("<span foreground='red'>%s</span>" % markup_escape_text(report_status_dict[plugin][MESSAGE])) # if the report was not succesful then this won't pass so this runs only # if report succeds and gets overwriten by the status message if report_status_dict[plugin][STATUS] == '1': |