Escape markup in server information
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
- Install
dictd
- Create
/etc/dictd/test.txt
- Insert the text
This is a test.</tt> <b>Look at me!
- Edit
/etc/dictd/dictd.conf
- Insert in section
global
site /etc/dictd/test.txt
- Build xfce4-dict from source
- Open Dictionary Server in Preferences
- Set server to localhost
- Click the lightbulb
- Verify the output is no longer monospace
- 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:
After: