fix(mpd): Escape MPD values in the label
This commit is contained in:
parent
a14b933d3e
commit
66b0420391
|
@ -142,19 +142,20 @@ void waybar::modules::MPD::setLabel() {
|
||||||
std::string singleIcon = getOptionIcon("single", singleActivated);
|
std::string singleIcon = getOptionIcon("single", singleActivated);
|
||||||
|
|
||||||
// TODO: format can fail
|
// TODO: format can fail
|
||||||
label_.set_markup(fmt::format(format,
|
label_.set_markup(
|
||||||
fmt::arg("artist", artist),
|
fmt::format(format,
|
||||||
fmt::arg("albumArtist", album_artist),
|
fmt::arg("artist", Glib::Markup::escape_text(artist).raw()),
|
||||||
fmt::arg("album", album),
|
fmt::arg("albumArtist", Glib::Markup::escape_text(album_artist).raw()),
|
||||||
fmt::arg("title", title),
|
fmt::arg("album", Glib::Markup::escape_text(album).raw()),
|
||||||
fmt::arg("date", date),
|
fmt::arg("title", Glib::Markup::escape_text(title).raw()),
|
||||||
fmt::arg("elapsedTime", elapsedTime),
|
fmt::arg("date", Glib::Markup::escape_text(date).raw()),
|
||||||
fmt::arg("totalTime", totalTime),
|
fmt::arg("elapsedTime", elapsedTime),
|
||||||
fmt::arg("stateIcon", stateIcon),
|
fmt::arg("totalTime", totalTime),
|
||||||
fmt::arg("consumeIcon", consumeIcon),
|
fmt::arg("stateIcon", stateIcon),
|
||||||
fmt::arg("randomIcon", randomIcon),
|
fmt::arg("consumeIcon", consumeIcon),
|
||||||
fmt::arg("repeatIcon", repeatIcon),
|
fmt::arg("randomIcon", randomIcon),
|
||||||
fmt::arg("singleIcon", singleIcon)));
|
fmt::arg("repeatIcon", repeatIcon),
|
||||||
|
fmt::arg("singleIcon", singleIcon)));
|
||||||
|
|
||||||
if (tooltipEnabled()) {
|
if (tooltipEnabled()) {
|
||||||
std::string tooltip_format;
|
std::string tooltip_format;
|
||||||
|
|
Loading…
Reference in New Issue