[gnome-maps] transitLegRow: Properly escape transit leg headsigns
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] transitLegRow: Properly escape transit leg headsigns
- Date: Fri, 12 May 2017 21:28:40 +0000 (UTC)
commit da62ad070f897c7b7b8a94822b6390e3acbd5f1f
Author: Marcus Lundblad <ml update uu se>
Date: Fri May 12 23:26:17 2017 +0200
transitLegRow: Properly escape transit leg headsigns
Trivial: Escape the headsign label text, since we pass it to a <span/>-
enclosed label text.
src/transitLegRow.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/transitLegRow.js b/src/transitLegRow.js
index b69129b..31be422 100644
--- a/src/transitLegRow.js
+++ b/src/transitLegRow.js
@@ -124,8 +124,8 @@ const TransitLegRow = new Lang.Class({
ellipsize: Pango.EllipsizeMode.END,
halign: Gtk.Align.START });
if (this._leg.transit && this._leg.headsign) {
- headsignLabel.label =
- '<span size="small">%s</span>'.format(this._leg.headsign);
+ let label = GLib.markup_escape_text(this._leg.headsign, -1);
+ headsignLabel.label = '<span size="small">%s</span>'.format(label);
} else if (!this._leg.transit) {
let label =
/* Translators: this is a format string indicating walking a certain
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]