! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-appfinder emits Gtk-Warnings on valid desktop files
Status:
RESOLVED: FIXED
Product:
Xfce4-appfinder
Component:
General

Comments

Description Kevin Fenzi 2009-03-23 17:57:27 CET
Greetings. 

xfce4-appfinder seems to emit: 

(xfce4-appfinder:2156): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1: Character ' ' is not valid at the start of an entity name; the & character begins an entity; if this ampersand isn't supposed to be an entity, escape it as &

and

(xfce4-appfinder:22504): Gtk-WARNING **: Failed to set text from markup due to
error parsing markup: Error on line 1: Character ' ' is not valid at the start
of an entity name; the & character begins an entity; if this ampersand isn't
supposed to be an entity, escape it as &

here on a Fedora rawhide install. 

This is due apparently to the fedora system-config-date desktop file that has "Date & Time" as the name. 

See: https://bugzilla.redhat.com/show_bug.cgi?id=491123
for more info. From comment #5 there: 

"According to the desktop file spec[1], the "Name" entry is a localestring and
its encoding is plain UTF-8, so my take is that it's the responsibility of the
application reading the desktop file to transcode this to proper markup before
letting gtk at it.

[1]: http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s03.html  "

Happy to provide further info or details.
Comment 1 Vincent Legout 2010-02-09 15:09:59 CET
Created attachment 2840 
Use g_markup_printf_escaped instead of g_strdup_printf

I confirm this bug.

Using g_markup_printf_escaped instead of g_strdup_printf seems to fix the problem. Attached is a small patch which fix this bug.
Comment 2 Nick Schermer editbugs 2010-09-13 06:18:04 CEST
This is in master for some time.

Bug #5141

Reported by:
Kevin Fenzi
Reported on: 2009-03-23
Last modified on: 2010-09-13

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Attachments

Additional information