From affc165bda9dd8a88de8c7d9b22d5ccb466f2742 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 9 Feb 2023 17:47:58 -0700 Subject: [PATCH] escape < and > in titlebars for tab widgets (#175) * escape < and > in titlebars for tab widgets * Use gears.string.xml_escape --------- Co-authored-by: Gokul Swaminathan --- widget/tabbar/default.lua | 1 + widget/tabbar/modern.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/widget/tabbar/default.lua b/widget/tabbar/default.lua index ad6b0b1..070b332 100644 --- a/widget/tabbar/default.lua +++ b/widget/tabbar/default.lua @@ -18,6 +18,7 @@ local position = beautiful.tabbar_position or "top" local function create(c, focused_bool, buttons, inactive_bool) local flexlist = wibox.layout.flex.horizontal() local title_temp = c.name or c.class or "-" + title_temp = gears.string.xml_escape(title_temp) local bg_temp = inactive_bool and bg_normal_inactive or bg_normal local fg_temp = inactive_bool and fg_normal_inactive or fg_normal if focused_bool then diff --git a/widget/tabbar/modern.lua b/widget/tabbar/modern.lua index 5f48066..81217b1 100644 --- a/widget/tabbar/modern.lua +++ b/widget/tabbar/modern.lua @@ -73,6 +73,7 @@ end local function create(c, focused_bool, buttons, inactive_bool) -- local flexlist = wibox.layout.flex.horizontal() local title_temp = c.name or c.class or "-" + title_temp = gears.string.xml_escape(title_temp) local bg_temp = inactive_bool and bg_normal_inactive or bg_normal local fg_temp = inactive_bool and fg_normal_inactive or fg_normal if focused_bool then