Revert "fix: Escape user controlled input"
This reverts commit 7247360e29
.
This commit is contained in:
parent
470f539346
commit
0271e9bc1a
|
@ -124,7 +124,7 @@ void waybar::modules::Custom::parseOutputRaw()
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (getline(output, line)) {
|
while (getline(output, line)) {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
text_ = Glib::Markup::escape_text(line);
|
text_ = line;
|
||||||
tooltip_ = line;
|
tooltip_ = line;
|
||||||
class_ = "";
|
class_ = "";
|
||||||
} else if (i == 1) {
|
} else if (i == 1) {
|
||||||
|
@ -144,8 +144,8 @@ void waybar::modules::Custom::parseOutputJson()
|
||||||
std::string line;
|
std::string line;
|
||||||
while (getline(output, line)) {
|
while (getline(output, line)) {
|
||||||
auto parsed = parser_.parse(line);
|
auto parsed = parser_.parse(line);
|
||||||
text_ = Glib::Markup::escape_text(parsed["text"].asString());
|
text_ = parsed["text"].asString();
|
||||||
alt_ = Glib::Markup::escape_text(parsed["alt"].asString());
|
alt_ = parsed["alt"].asString();
|
||||||
tooltip_ = parsed["tooltip"].asString();
|
tooltip_ = parsed["tooltip"].asString();
|
||||||
class_ = parsed["class"].asString();
|
class_ = parsed["class"].asString();
|
||||||
if (!parsed["percentage"].asString().empty() && parsed["percentage"].isUInt()) {
|
if (!parsed["percentage"].asString().empty() && parsed["percentage"].isUInt()) {
|
||||||
|
|
|
@ -20,7 +20,7 @@ void waybar::modules::sway::Mode::worker()
|
||||||
auto res = ipc_.handleEvent();
|
auto res = ipc_.handleEvent();
|
||||||
auto parsed = parser_.parse(res.payload);
|
auto parsed = parser_.parse(res.payload);
|
||||||
if (parsed["change"] != "default") {
|
if (parsed["change"] != "default") {
|
||||||
mode_ = Glib::Markup::escape_text(parsed["change"].asString());
|
mode_ = parsed["change"].asString();
|
||||||
} else {
|
} else {
|
||||||
mode_.clear();
|
mode_.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue