Skip to content

sharing: Disable AdwActionRow markup for networks

Whenever I open the Sharing panel, I instantly get two GTK warnings like Failed to set text 'Foo & Bar' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &. These happen because I have an ampersand in my WiFi name. Due to this, when I open File Sharing, no network name is shown, although the switch does work:


Network names have many allowed characters, among which &, <, and >. These are problematic for Pango markup. By default, AdwActionRow has markup enabled for its title. We could escape strings at every adw_preferences_row_set_title call, but this might be easy to forget in the future. Instead, let's disable markup altogether for these rows.

That was also the behavior before Adwaita was used for these rows I believe.

Merge request reports