From c9012c4107204301f473620606a0931e7e1d95a1 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 5 Jul 2026 10:10:10 +0200 Subject: [PATCH] sway/window: escape window title in tooltip markup setTooltipMarkup uses set_tooltip_markup without escaping. Raw window titles routinely contain &, < and >, which break Pango markup parsing and the tooltip. Escape the title with Glib::Markup::escape_text before passing it. --- src/modules/sway/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/sway/window.cpp b/src/modules/sway/window.cpp index f005bd14..4faa7d77 100644 --- a/src/modules/sway/window.cpp +++ b/src/modules/sway/window.cpp @@ -101,7 +101,7 @@ auto Window::update() -> void { fmt::arg("shell", shell_), fmt::arg("marks", marks_)), config_["rewrite"])); if (tooltipEnabled()) { - setTooltipMarkup(window_); + setTooltipMarkup(Glib::Markup::escape_text(window_)); } // Resolve the app icon on the main thread to avoid racing with GTK draw on the