From 0963cacc04219b94014960bbcc60a9913821ffa3 Mon Sep 17 00:00:00 2001 From: mgrojo Date: Wed, 2 Sep 2020 21:33:48 +0200 Subject: [PATCH] Fix problems when showing help message in rich text format Due to use of '<>' characters, the text has to be escaped for HTML. See issue #1069 --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 76de7b00..7a3ca36b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,11 +40,11 @@ int main( int argc, char ** argv ) // Create application object. All the initialisation stuff happens in there Application a(argc, argv); - // If there has been output in the message box, let user see it. + // If there has been invocations to the message handler, show it to user in a message box. if(!message.isEmpty()) { QMessageBox messageBox; messageBox.setTextFormat(Qt::RichText); - messageBox.setText("
" + message + "
"); + messageBox.setText("
" + message.toHtmlEscaped() + "
"); messageBox.exec(); }