GNOME Bugzilla – Bug 786197
GdMainIconBoxChild: Don't set use-markup on the GtkLabels
Last modified: 2017-08-18 10:33:43 UTC
The primary and secondary GtkLabels in GdMainIconBoxChild have use-markup=TRUE. That's a problem if GdMainBoxItem:primary/secondary-text has things like ampersands and angular brackets in them. One option is to escape the strings using a GBindingTransformFunc so that they are parsed verbatim. However, there is no way of knowing if the strings actually have markup or not. eg., "Foo < Bar" versus "<b>Foo Bar</b>". g_markup_escape_text will corrupt the markup in the latter case. Therefore, I think we shouldn't unconditionally set GtkLabel:user-markup. In future, if some application does want to use markup, we should add a new GdMainBoxItem property to conditionally set it, and let the GdMainBoxItem take care of properly escaping the string.
Created attachment 357495 [details] [review] main-icon-box-child: Don't set use-markup on the GtkLabels
Comment on attachment 357495 [details] [review] main-icon-box-child: Don't set use-markup on the GtkLabels I am tentatively pushing this because we are reaching the end of the development cycle. Let me know if something is wrong.