Skip to content

Commit

Permalink
Escape audio profile names for markup
Browse files Browse the repository at this point in the history
Closes #2326
  • Loading branch information
cschramm authored and infirit committed Apr 7, 2024
1 parent 902fb00 commit 9735152
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blueman/plugins/applet/PulseAudioProfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
from gettext import gettext as _
from html import escape
from typing import TYPE_CHECKING, Any, Dict, List, Mapping, Callable

from blueman.main.PulseAudioUtils import EventType, PulseAudioUtils
Expand Down Expand Up @@ -62,7 +63,7 @@ def _generate_profiles_menu(info: "CardInfo") -> List["SubmenuItemDict"]:
if not info:
return items
for profile in info["profiles"]:
profile_name = profile["description"]
profile_name = escape(profile["description"])
profile_icon = "bluetooth-symbolic"
if profile["name"] == info["active_profile"]:
profile_name = f"<b>{profile_name}</b>"
Expand Down

0 comments on commit 9735152

Please sign in to comment.