Skip to content

event-popover: Sanitize HTML to convert to Pango Markup

gtk_label_set_markup accepts Pango Markup 1 extended with tags with a subset of common attributes 2. We, however, pass the event description there, which often contains HTML layout, often with non-existent tags. It doesn't pass Pango's validation, as a result, nothing at all is shown.

Try to validate the description by parsing it as HTML in the relaxed mode, stripping off all tags unknown to Pango and only keeping the valid subset. Set tooltips for links, so that the user could know where they lead to. Drop the attributes of because they are not compatible between HTML and Pango. Add some mappings for widely-used tags.

Fixes: #1100
Fixes: #1238

Edited by gentoo-root

Merge request reports