Zenity should ignore markup with a flag

Bug #387536 reported by Jonathan Reed
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Zenity
Fix Released
Wishlist
zenity (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Zenity (specifically, the --info mode) should have a flag that will cause it to ignore Pango markup in its input. I frequently want to use Zenity to display output from scripts, and I shouldn't have to worry about whether the text has things like ampersands in it.

(This is particularly annoying, because instead of failing to run when given incorrect input, Zenity will silently default to "All updates are complete", but that's another bug.)

I know that I can pipe into zenity --text-info, but that's a workaround, and I don't particularly want to confuse the user by presenting them with a text entry dialog when I just want to display some status information.

Some sort of --ignore-pango flag for Zenity would be great.

jdreed@infinite-loop:~$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04
jdreed@infinite-loop:~$ apt-cache policy zenity
zenity:
  Installed: 2.26.0-0ubuntu2
  Candidate: 2.26.0-0ubuntu2

Revision history for this message
Joaquín Ismael Robles (ecologix2000) wrote :

Can you post an example of text used? zenity --info --text ...

Changed in zenity (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Jonathan Reed (jdreed) wrote :

Any text with an ampersand will trigger the bug.

$ zenity --info --text 'This has an & in it'

The following is printed to stderr:
(zenity:21569): 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 zenity displays its default "All updates are complete" dialog instead of the text.

Ideally, it should be told to ignore Pango markup. Failing that, the man page should explicitly inform users that they need to escape anything that could be interpreted as Pango markup.

Changed in zenity (Ubuntu):
status: Incomplete → New
Revision history for this message
Jonathan Reed (jdreed) wrote :

And before anyone asks, yes this is still present in Lucid.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at:
 https://bugzilla.gnome.org/show_bug.cgi?id=621907

Changed in zenity (Ubuntu):
status: New → Triaged
Changed in zenity:
status: Unknown → New
Changed in zenity:
importance: Unknown → Wishlist
Changed in zenity:
status: New → Fix Released
Revision history for this message
JC Hulce (soaringsky) wrote :

Upstream fixed release is in Ubuntu

Changed in zenity (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Paul Whittaker (launchpad-pdw) wrote :

Which package version includes that upstream bugfix? I'm still being bitten by this issue. This is on a fully up-to-date 12.04.3 system.

$ apt-cache policy zenity
zenity:
  Installed: 3.4.0-0ubuntu4
  Candidate: 3.4.0-0ubuntu4

$ zenity --info --text 'x & y'

(zenity:14047): Gtk-WARNING **: Failed to set text 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 &

(zenity:14047): Gtk-WARNING **: Failed to set text 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 &

    [(x) Information ]
    [----------------------------------]
    [ (info) All updates are complete. ]
    [ (icon) ]
    [ ]
    [ [OK] ]

Revision history for this message
WoodyEckelzone (bcr497) wrote :

Use `--no-markup` flag

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.