gnunn1 / tilix

A tiling terminal emulator for Linux using GTK+ 3
https://gnunn1.github.io/tilix-web
Mozilla Public License 2.0
5.34k stars 294 forks source link

Fix markup error of lblTitle #2204

Open taoky opened 5 months ago

taoky commented 5 months ago

Recently when auditing my laptop's log, I found that sometimes tilix outputs errors like this:

Jan 14 19:16:46 hostname tilix[602551]: Failed to set text '1: sleep 10 && ls ~' 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 &

This could be easily reproduced with fish shell:

> tilix --new-process

And then in the new tilix window (in fish):

> sleep 10 && ls

And you could get this Gtk warning (The GtkLabel inside the GtkBox is also not updated). This PR simply uses setText instead of setMarkup, as it seems that no pango markup is actually used here.