We need to be careful about feeding FLTK @:s when they will be used in a
label as that is a formatting character.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4440 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 5b98d97..5b5f5bb 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -42,6 +42,7 @@
#include "CConn.h"
#include "OptionsDialog.h"
#include "i18n.h"
+#include "fltk_layout.h"
#include "parameters.h"
#include "keysym2ucs.h"
@@ -575,6 +576,7 @@
void Viewport::popupContextMenu()
{
const Fl_Menu_Item *m;
+ char buffer[1024];
contextMenu->position(Fl::event_x(), Fl::event_y());
@@ -618,8 +620,10 @@
OptionsDialog::showDialog();
break;
case ID_INFO:
- fl_message_title(_("VNC connection info"));
- fl_message(cc->connectionInfo());
+ if (fltk_escape(cc->connectionInfo(), buffer, sizeof(buffer)) < sizeof(buffer)) {
+ fl_message_title(_("VNC connection info"));
+ fl_message(buffer);
+ }
break;
case ID_ABOUT:
about_vncviewer();