From 3eb901f800dd34f9b66e8e19fabe7230bfdab7e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ribeiro?= Date: Sat, 23 Mar 2019 18:48:26 +0000 Subject: [PATCH] Escape ESSID text before interpreting as pango Fixes #240. --- src/modules/network.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/network.cpp b/src/modules/network.cpp index 376c1e29..93a0d3fa 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -491,7 +491,9 @@ void waybar::modules::Network::parseEssid(struct nlattr **bss) if (ies_len > hdr_len && ies_len > ies[1] + hdr_len) { auto essid_begin = ies + hdr_len; auto essid_end = essid_begin + ies[1]; - std::copy(essid_begin, essid_end, std::back_inserter(essid_)); + std::string essid_raw; + std::copy(essid_begin, essid_end, std::back_inserter(essid_raw)); + essid_ = Glib::Markup::escape_text(essid_raw); } } }