Skip to content

Commit

Permalink
Merge pull request #3877 from pol-rivero/tray-tooltip
Browse files Browse the repository at this point in the history
Escape tray tooltip text
  • Loading branch information
Alexays authored Jan 12, 2025
2 parents 369c81d + 0992bf1 commit 4ec1218
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/sni/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ ToolTip get_variant<ToolTip>(const Glib::VariantBase& value) {
result.text = get_variant<Glib::ustring>(container.get_child(2));
auto description = get_variant<Glib::ustring>(container.get_child(3));
if (!description.empty()) {
result.text = fmt::format("<b>{}</b>\n{}", result.text, description);
auto escapedDescription = Glib::Markup::escape_text(description);
result.text = fmt::format("<b>{}</b>\n{}", result.text, escapedDescription);
}
return result;
}
Expand Down

0 comments on commit 4ec1218

Please sign in to comment.