From 0271e9bc1a3ed0d29b99519f3b6ae59b0bbeb677 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 28 Feb 2019 19:30:27 +0100 Subject: [PATCH] Revert "fix: Escape user controlled input" This reverts commit 7247360e2972798cd525b8a9493ab4f15c546712. --- src/modules/custom.cpp | 6 +++--- src/modules/sway/mode.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/custom.cpp b/src/modules/custom.cpp index eeff881a..b1f03e1a 100644 --- a/src/modules/custom.cpp +++ b/src/modules/custom.cpp @@ -124,7 +124,7 @@ void waybar::modules::Custom::parseOutputRaw() int i = 0; while (getline(output, line)) { if (i == 0) { - text_ = Glib::Markup::escape_text(line); + text_ = line; tooltip_ = line; class_ = ""; } else if (i == 1) { @@ -144,8 +144,8 @@ void waybar::modules::Custom::parseOutputJson() std::string line; while (getline(output, line)) { auto parsed = parser_.parse(line); - text_ = Glib::Markup::escape_text(parsed["text"].asString()); - alt_ = Glib::Markup::escape_text(parsed["alt"].asString()); + text_ = parsed["text"].asString(); + alt_ = parsed["alt"].asString(); tooltip_ = parsed["tooltip"].asString(); class_ = parsed["class"].asString(); if (!parsed["percentage"].asString().empty() && parsed["percentage"].isUInt()) { diff --git a/src/modules/sway/mode.cpp b/src/modules/sway/mode.cpp index a2da0782..c4b47350 100644 --- a/src/modules/sway/mode.cpp +++ b/src/modules/sway/mode.cpp @@ -20,7 +20,7 @@ void waybar::modules::sway::Mode::worker() auto res = ipc_.handleEvent(); auto parsed = parser_.parse(res.payload); if (parsed["change"] != "default") { - mode_ = Glib::Markup::escape_text(parsed["change"].asString()); + mode_ = parsed["change"].asString(); } else { mode_.clear(); }