[gnome-maps] MainWindow: escape markup for place description
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] MainWindow: escape markup for place description
- Date: Thu, 29 Aug 2013 06:45:47 +0000 (UTC)
commit 70db63480875dc04386601749ffaaecbcc310dd5
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Fri Aug 23 14:14:01 2013 +0200
MainWindow: escape markup for place description
It is possible to get search results that include characters like '&'.
We need to escape the markup sent to the search result treeview.
Otherwise we end up with warnings in the console like:
"(gnome-maps:2368): Gtk-WARNING **: Failed to set text from markup due to
error parsing markup: Error on line 1: Entity did not end with a
semicolon; most likely you used an ampersand character without intending
to start an entity - escape ampersand as &"
https://bugzilla.gnome.org/show_bug.cgi?id=706653
src/mainWindow.js | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 4de10b9..e755f40 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -250,7 +250,11 @@ const MainWindow = new Lang.Class({
if (location == null)
return;
- let description_markup = '<b>' + location.description + '</b>';
+ let description_markup =
+ '<b>' +
+ GLib.markup_escape_text(location.description, -1) +
+ '</b>';
+
model.set(iter,
[SearchResults.COL_DESCRIPTION,
SearchResults.COL_LOCATION],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]