MessageDlg fails is message text contains <, >
Original Reporter info from Mantis: mftq75
-
Reporter name: C Western
Original Reporter info from Mantis: mftq75
- Reporter name: C Western
Description:
MessageDlg does not display a string such as MessageDlg("Hello, &LtPos;a|H|b>"). This appears to be due to the need to properly escape special characters in the string in the gtk2 interface. The attached patch is a possible fix.
Additional information:
The patch contains:
// Can't pass message string to gtk_message_dialog_new, as % chars are interpreted
// gtk_message_dialog_set_markup interpets HTML, so we need to quote that
QuotedMessage := g_markup_escape_text(PGChar(DialogMessage), Length(DialogMessage));
gtk_message_dialog_set_markup(PGtkMessageDialog(Dialog), QuotedMessage);
g_free(QuotedMessage);
Mantis conversion info:
- Mantis ID: 18584
- OS: linux
- OS Build: Fedora 14
- Platform: i386
- Version: 0.9.31 (SVN)
- Fixed in revision: 29159 (#0797b997)
- Target version: 0.9.30