Skip to content

Add template helper function for pango markup escaping #133

@un-def

Description

@un-def

I use playerctl metadata with i3bar and forced to use none markup mode because any special char (<, >, &, etc.) in metadata field breaks pango markup.

It would be convenient to have some helper function to encode special chars to corresponding entities (e.g., <&lt;). This would allow to use pango markup safely, for example:

playerctl --follow metadata --format '<b>pango_escape({{artist}})</b> — pango_escape({{title}})'

I guess this can be done quite easily with g_markup_escape_text().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions