It marks up the text correctly in most cases.
But if the text contains markup that cannot be parsed (like <email address hidden> in my screenshot) the whole label is displayed as plain text. So I would suggest to escape all markup that may be in the document title.
Does it work for you, if you have a document with a title that contains markup?
The following example demonstrates this:
label = gtk.Label ("<b>Valid</b> -- <b_>invalid</b_>")
label.set_use_markup (True)
Which leads to the following error:
__main__:1: GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag 'b_' on line 1 char 29
It marks up the text correctly in most cases.
But if the text contains markup that cannot be parsed (like <email address hidden> in my screenshot) the whole label is displayed as plain text. So I would suggest to escape all markup that may be in the document title.
Does it work for you, if you have a document with a title that contains markup?
The following example demonstrates this: set_use_ markup (True)
label = gtk.Label ("<b>Valid</b> -- <b_>invalid</b_>")
label.
Which leads to the following error:
__main__:1: GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag 'b_' on line 1 char 29