From 6ef6a1f8505298a969ddbdbf577678fead2b9dbb Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Thu, 6 Mar 2014 17:07:00 +0100 Subject: Fix for Bug #1288401 (Hovering in symbols dialog over symbols with ampersand in description result in console warning). Fixed bugs: - https://launchpad.net/bugs/1288401 (bzr r13122) --- src/sp-use.cpp | 3 ++- src/ui/dialog/symbols.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sp-use.cpp b/src/sp-use.cpp index e394e84c2..14f51159b 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -22,6 +22,7 @@ #include <2geom/transforms.h> #include +#include #include "display/drawing-group.h" #include "attributes.h" #include "document.h" @@ -219,7 +220,7 @@ const char* SPUse::displayName() const { gchar* SPUse::description() const { if (this->child) { if( SP_IS_SYMBOL( this->child ) ) { - return g_strdup_printf(_("called %s"), this->child->title()); + return g_strdup_printf(_("called %s"), Glib::Markup::escape_text(Glib::ustring( g_dpgettext2(NULL, "Symbol", this->child->title()))).c_str()); } static unsigned recursion_depth = 0; diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp index 62a2f8572..9479430d2 100644 --- a/src/ui/dialog/symbols.cpp +++ b/src/ui/dialog/symbols.cpp @@ -687,7 +687,7 @@ void SymbolsDialog::add_symbol( SPObject* symbol ) { if( pixbuf ) { Gtk::ListStore::iterator row = store->append(); (*row)[columns->symbol_id] = Glib::ustring( id ); - (*row)[columns->symbol_title] = Glib::ustring( g_dpgettext2(NULL, "Symbol", title) ); + (*row)[columns->symbol_title] = Glib::Markup::escape_text(Glib::ustring( g_dpgettext2(NULL, "Symbol", title) )); (*row)[columns->symbol_image] = pixbuf; } -- cgit v1.2.3