diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 7b61cf834..090a137b8 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -16,7 +16,6 @@ =========================================================================*/ #include "CMakeSetupDialog.h" - #include #include #include @@ -177,7 +176,7 @@ void CMakeSetupDialog::initialize() QObject::connect(this->CMakeThread->cmakeInstance(), SIGNAL(outputMessage(QString)), - this->Output, SLOT(append(QString))); + this, SLOT(message(QString))); QObject::connect(this->Advanced, SIGNAL(clicked(bool)), this->CacheValues, SLOT(setShowAdvanced(bool))); @@ -467,10 +466,27 @@ void CMakeSetupDialog::error(const QString& message) QStringList messages = message.split('\n'); foreach(QString m, messages) { + // make sure we escape html tags in the cmake messages + m.replace(QString("&"), QString("&")); + m.replace(QString("<"), QString("<")); + m.replace(QString(">"), QString(">")); this->Output->append(QString("%1").arg(m)); } } +void CMakeSetupDialog::message(const QString& message) +{ + QStringList messages = message.split('\n'); + foreach(QString m, messages) + { + // make sure we escape html tags in the cmake messages + m.replace(QString("&"), QString("&")); + m.replace(QString("<"), QString("<")); + m.replace(QString(">"), QString(">")); + this->Output->append(m); + } +} + void CMakeSetupDialog::setEnabledState(bool enabled) { // disable parts of the GUI during configure/generate diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index edbede656..652660a53 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -50,6 +50,7 @@ protected slots: void finishConfigure(int error); void finishGenerate(int error); void error(const QString& message); + void message(const QString& message); void doSourceBrowse(); void doBinaryBrowse();