Skip to content

Escape markup in server information

Hunter Turcin requested to merge huntertur/xfce4-dict:misc-fix into master

During the discussion on my previously-reported issue at #6 (closed) I spent some time looking through the source code of xfce4-dict to understand that issue better. While looking through the source code, I noticed an unrelated issue that could allow server information responses that contain Pango markup tags to result in unexpectedly-formatted output and warnings printed to the console.

Reproduction Steps

  1. Install dictd
  2. Create /etc/dictd/test.txt
  3. Insert the text This is a test.</tt> <b>Look at me!
  4. Edit /etc/dictd/dictd.conf
  5. Insert in section global site /etc/dictd/test.txt
  6. Build xfce4-dict from source
  7. Open Dictionary Server in Preferences
  8. Set server to localhost
  9. Click the lightbulb
  10. Verify the output is no longer monospace
  11. Verify a GTK warning is printed to the console about the markup

Post-Patch Steps

In Step 10, the output should be entirely monospace, and in Step 11, no warnings about markup should be printed to the console.

Screenshots

Before:

image

After:

image

Merge request reports

Loading