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 <gokulswamilive@gmail.com>
This commit is contained in:
Paul Davis 2023-02-09 17:47:58 -07:00 committed by GitHub
parent 57786e08f4
commit affc165bda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,7 @@ local position = beautiful.tabbar_position or "top"
local function create(c, focused_bool, buttons, inactive_bool) local function create(c, focused_bool, buttons, inactive_bool)
local flexlist = wibox.layout.flex.horizontal() local flexlist = wibox.layout.flex.horizontal()
local title_temp = c.name or c.class or "-" 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 bg_temp = inactive_bool and bg_normal_inactive or bg_normal
local fg_temp = inactive_bool and fg_normal_inactive or fg_normal local fg_temp = inactive_bool and fg_normal_inactive or fg_normal
if focused_bool then if focused_bool then

View File

@ -73,6 +73,7 @@ end
local function create(c, focused_bool, buttons, inactive_bool) local function create(c, focused_bool, buttons, inactive_bool)
-- local flexlist = wibox.layout.flex.horizontal() -- local flexlist = wibox.layout.flex.horizontal()
local title_temp = c.name or c.class or "-" 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 bg_temp = inactive_bool and bg_normal_inactive or bg_normal
local fg_temp = inactive_bool and fg_normal_inactive or fg_normal local fg_temp = inactive_bool and fg_normal_inactive or fg_normal
if focused_bool then if focused_bool then