[gnome-maps] placeBubble: Escape markup for website URIs
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] placeBubble: Escape markup for website URIs
- Date: Tue, 6 Sep 2016 19:39:00 +0000 (UTC)
commit 706ea4dc17e54f181e3d9a0b8ce470b01cf465bc
Author: Marcus Lundblad <ml update uu se>
Date: Sat Apr 16 12:12:58 2016 +0200
placeBubble: Escape markup for website URIs
https://bugzilla.gnome.org/show_bug.cgi?id=765138
src/placeBubble.js | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/placeBubble.js b/src/placeBubble.js
index be364e9..254067c 100644
--- a/src/placeBubble.js
+++ b/src/placeBubble.js
@@ -199,8 +199,10 @@ const PlaceBubble = new Lang.Class({
halign: Gtk.Align.START });
if (expandedContent[row].linkUrl) {
let text = expandedContent[row].linkText;
- let uri = expandedContent[row].linkUrl;
- let a = '<a href="%s" title="%s">%s</a>'.format(uri, uri, text);
+ let uri = GLib.markup_escape_text(expandedContent[row].linkUrl, -1);
+ /* double-escape the tooltip text, as GTK+ treats it as markup */
+ let tooltipText = GLib.markup_escape_text(uri, -1);
+ let a = '<a href="%s" title="%s">%s</a>'.format(uri, tooltipText, text);
info.label = a;
} else {
info.label = expandedContent[row].info;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]