Skip to content

Commit 4ec1218

Browse files
authored
Merge pull request #3877 from pol-rivero/tray-tooltip
Escape tray tooltip text
2 parents 369c81d + 0992bf1 commit 4ec1218

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/modules/sni/item.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ ToolTip get_variant<ToolTip>(const Glib::VariantBase& value) {
124124
result.text = get_variant<Glib::ustring>(container.get_child(2));
125125
auto description = get_variant<Glib::ustring>(container.get_child(3));
126126
if (!description.empty()) {
127-
result.text = fmt::format("<b>{}</b>\n{}", result.text, description);
127+
auto escapedDescription = Glib::Markup::escape_text(description);
128+
result.text = fmt::format("<b>{}</b>\n{}", result.text, escapedDescription);
128129
}
129130
return result;
130131
}

0 commit comments

Comments
 (0)