Darktable: Style description parsing error/issue in darkroom view

Created on 28 Jan 2020  路  3Comments  路  Source: darktable-org/darktable

Describe the bug

When selecting a style that contains an ampersand (&) in its description field the information shown will be empty and the following message will appear in the terminal:

(darktable:18847): Gtk-WARNING **: 11:31:14.179: Failed to set text 'Agfa (Black&White): Agfapan 400
channel mixer (on)' 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 &

There is, however, no lone & in the description field. It is coded the way it should be:

<info>
    <name>Black&amp;White|Agfa|Agfapan 400</name>
    <description>Agfa (Black&amp;White): Agfapan 400</description>
</info>

This only happens in darkroom view and only with the description field. No problems whatsoever in lighttable view and with the & in the name field.

To Reproduce

Create or change an existing style and use & in the description field.

  1. Start darktable from terminal
  2. In lighttable view
  3. Open the styles module
  4. Hover over the "problem" style
  5. All information is shown, no messages in the terminal
  6. Load an image in darkroom
  7. Toggle the styles quick access
  8. Hover over the "problem" style
  9. No info is shown at all, multiple error messages in the terminal

Expected behavior
The information to be shown as is done when in lighttable view.

Platform (please complete the following information):

  • Darktable Version: Both 3.0.0 stable and 3.1.0+433
  • OS: Linux, Debian Buster (10.2)

Additional context

  • I manually changed a style using vi and also tried creating one using darktable: Same result.
  • This is not related to the hierarchical notation. Checked this.
  • A clean environment (fully remove data.db, darktablerc etc) doesn't help.
  • Initially noticed on a personalised compilation (both stable and dev)
  • Also present on a recompiled version using the build.sh script (using: ./build.sh --prefix /home/jade/dt.tmp)
pending DAM

Most helpful comment

This is now fixed in master and 3.0.1. Thanks for reporting.

All 3 comments

It seems that problem with reading description is not limited to &amp. I've managed to reproduce it using &lt;, however &gt; & &quot; do not produce the error mentioned.

I did not check those......

There are only 5 characters that need to be escaped when using xml. There is still one missing from the above posts: ' This one does not produce the issue.

Here are all 5 and the result when parsing them:

_&_ error
' OK
> OK
_<_ error
" OK

This is now fixed in master and 3.0.1. Thanks for reporting.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Egocentrix picture Egocentrix  路  5Comments

schwerdf picture schwerdf  路  4Comments

trougnouf picture trougnouf  路  5Comments

Nilvus picture Nilvus  路  5Comments

denever picture denever  路  4Comments