Am 16.07.2010 12:34, Gregor Best wrote:
Hi people,

the attached two patches fix a little issue some people had with
naughty. When a notification with broken markup was received, naughty
only displayed a little empty box and issued a warning about broken
pango markup on stderr.

The first patch adds a new read-only textbox property called
well_formed_markup which is true if the markup is okay and false
otherwise.

The second patch uses the new property to escape all HTML entities in a
message if the markup is not valid pango markup.

I don't really like this approach, but I guess it works...

Actually... If draw_text_context_init() fails, shouldn't that cause the textbox to have an empty string? I have something like this in mind:

textbox.text = "<foo>"
if textbox.text == "" do print("<foo> is invalid") end

Anyone wants to test if this already works? If yes, we can make that expected behavior and (ab)use it for this.


Besides: Yay! Thanks for looking into this. :)

Uli

--
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to