GNOME Bugzilla – Bug 719683
Escaping issue "Failed to set text from markup due to error parsing markup" when using bookmark containing '&'
Last modified: 2015-05-24 19:04:59 UTC
Steps to reproduce: 1. create a folder, rename it to something containing '&', e.g. "a&b" 2. add this folder to bookmarks bar 3. watch Nautilus printing stdout/stderr Nautilus generates this output multiple times per second: ~~~~~ (nautilus:5461): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Fehler in Zeile 1: Entität endete nicht mit einem Semikolon; wahrscheinlich haben Sie ein &-Zeichen benutzt, ohne eine Entität beginnen zu wollen - umschreiben Sie das »&« als & ~~~~~ (translated:) Error in line 1: Entity not terminated with semicolon; You probably used the character & without trying to start an entity – replace »&« with & I think there is some escaping missing. Additional info: The same problem exists with bookmark names containing '<', e.g. "a<b" ~~~~~ Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Fehler in Zeile 1, Zeichen 30: »b<« ist kein gültiger Name: »<« ~~~~~ (translated:) Error in line 1: Character 30: »b<« is no valid name: »<« This probably happens with other HTML/XML special characters too.
This bug is still present in Nautilus 3.16
-> gtk+ The bug is in GtkPlacesSidebar.
Created attachment 303872 [details] [review] placessidebar: escape tooltip text before setting it gtk_tree_view_set_tooltip_column() specifies that markup in the text should be escaped. This fixes critical warnings when hovering over items in the sidebar for bookmarks that have markup characters in their names.
Review of attachment 303872 [details] [review]: sure
Thanks, pushed to master. Attachment 303872 [details] pushed as e0b1ea1 - placessidebar: escape tooltip text before setting it