Error message shows markup

Bug #567324 reported by Simon Olofsson on 2010-04-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
system-config-printer (Ubuntu)

Bug Description

Binary package hint: system-config-printer-gnome

The error message dialog that informs about a printer error shows markup, if the document title contains markup. See attached screenshot.
The document title should be escaped.

Simon Olofsson (simono) wrote :
Changed in system-config-printer (Ubuntu):
assignee: nobody → Simon Olofsson (simono)
status: New → In Progress
description: updated
Simon Olofsson (simono) on 2010-04-20
Changed in system-config-printer (Ubuntu):
status: In Progress → Confirmed
assignee: Simon Olofsson (simono) → nobody
James Westby (james-w) wrote :


Would you forward this change upstream please?



Tim Waugh (twaugh) wrote :

Patch looks wrong to me.

Tim Waugh (twaugh) wrote :

I saw the patch. It's wrong.

Take a look at the surrounding code, and all the other dialogs, to see why. We call set_use_markup() so pango should mark up the text correctly. If it isn't doing that for you, you need to investigate why that is. (Works for me...)

Simon Olofsson (simono) wrote :

It marks up the text correctly in most cases.
But if the text contains markup that cannot be parsed (like <email address hidden> in my screenshot) the whole label is displayed as plain text. So I would suggest to escape all markup that may be in the document title.

Does it work for you, if you have a document with a title that contains markup?

The following example demonstrates this:
  label = gtk.Label ("<b>Valid</b> -- <b_>invalid</b_>")
  label.set_use_markup (True)

Which leads to the following error:
  __main__:1: GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag 'b_' on line 1 char 29

Tim Waugh (twaugh) wrote :

Ah, I understand now, I apologise.

Simon Olofsson (simono) wrote :

Tim, sorry if I was unclear. Can you apply the patch upstream? Or how do we proceed?

Btw, here is package:

Tim Waugh (twaugh) wrote :

Applied. I wanted to investigate whether xml.sax is an additional dependency outside of the main python package, and it looks like it's provided as part of python so that's fine.

Changed in system-config-printer (Ubuntu):
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-printer - 1.2.3+20100713-0ubuntu1

system-config-printer (1.2.3+20100713-0ubuntu1) maverick; urgency=low

  * New upstream release
     o GIT 1.2.x snapshot from 13 July 2010
     o Version 1.2.3 plus some additional fixes and translations
     o Plug'n'Print also for Bluetooth printers now.
     o Do not automatically set up a print queue if a driver executable is
     o Improvements on device ID handling: Discovery via SNMP, non-UTF-8
       environments, ignore the deprecated hal backend.
     o Avoid Yes/No buttons (Upstream bug #204).
     o Re-introduced and added keyboard accelerators for system-config-printer
       itself and for the job viewer.
     o New HIG-compliant job viewer UI. Thanks to Sergey Nizovtsev for the
       patch (LP: #555213, upstream bug #205).
     o Attempt to translate backend device-info strings and other fixes
       on the translation mechanism (LP: #557199).
     o Fixed markup in error pop-ups (LP: #567324).
     o Made width of "Verify" button in New Printer Wizard adapt to the length
       of the actual translation of "Verify" (LP: #575048).
     o Make Kyocera detected if it reports only the model name (Upstreamized
       LP: #564633).
     o Removed doubled-up 'translatable' attribute in UI file (LP: #571662).
     o Handle IPP failure fetching printer attrs for completed jobs
       (LP: #561082).
     o Many more bug fixes and UI improvements.
     o Translation updates.
  * debian/patches/57_backend-integration-dnssd-bluetooth.patch,
    Regenerated to work with new upstream code.
  * debian/patches/97_add-missing-make-name-kyocera-mita.patch: Removed
    patches for upstream fixes.
  * debian/patches/57_backend-integration-dnssd-bluetooth.patch: To check for
    HP fax devices do not do an exact match of "Fax" with the model name but
    check whether the model name begins with "Fax".
  * debian/patches/44_no-runtime-error-on-missing-firewall.patch: Let the
    firewall functions exit silently if there is no firewall service on the
  * debian/patches/50_give-priority-to-hpcups.patch: Prioritize hpcups against
    HPIJS again. It should have matured enough now.
  * debian/system-config-printer-common.install: Added new
  * debian/rules: Added directory settings for UDEV rules and scripts to the
    "make install" command line.
  * debian/control: Added libglib2.0-dev as build dependency, needed for the
    Bluetooth Plug'n'Print support.
 -- Till Kamppeter <email address hidden> Tue, 13 Jul 2010 13:21:33 +0200

Changed in system-config-printer (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments