Hi,

On Sun, May 18, 2014 at 7:41 AM, MarLOne <infoseeker...@gmail.com> wrote:
> Hi all,
>
> The problem is not just confined to < > but also '&' which needs to be
> replaced by &amp;.
>
> You cannot display these string:
> "You can't display string with <hello>"
> "You can't display string with &."
>
> It seems the code behind the Gtk.MessageDialog() expects that the string to
> be displayed is a well-formed XML (or XHTML) string.

The shorter Gtk.MessageDialog constructor use the native function
gtk_message_dialog_new_with_markup, which expects the string to be
Pango markup:
https://developer.gnome.org/pygtk/stable/pango-markup-language.html

If you don't want that, you can use the other constructor that has an
additional use_markup bool:
http://docs.go-mono.com/?link=C%3aGtk.MessageDialog.MessageDialog(Gtk.Window%2cGtk.DialogFlags%2cGtk.MessageType%2cGtk.ButtonsType%2cbool%2cstring%2cobject%5b%5d)

--
Bertrand
_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to