[pygtk] Problems with '&' in treeview

Felix Rabe (public) public at felixrabe.textdriven.com
Thu Apr 26 23:03:12 WST 2007


Volker Helm wrote:

> So, with every '&' the System went wrong. Is there an easy way to mask '&' instead of replacing it with '&'?

Use gobject.markup_escape_text:

   gobject.markup_escape_text("This & <That>")
   # -->  'This &amp; &lt;That&gt;'


- Felix


More information about the pygtk mailing list