From bac08e9380eaa2ea21e8ec3dda6d6d1cd160cbe1 Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Wed, 21 Apr 2010 14:30:22 +0200
Subject: [PATCH] Escape env vars for the summary

---
 src/plugins/projectexplorer/environmenteditmodel.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/plugins/projectexplorer/environmenteditmodel.cpp b/src/plugins/projectexplorer/environmenteditmodel.cpp
index de116228aea..eb177b63a2a 100644
--- a/src/plugins/projectexplorer/environmenteditmodel.cpp
+++ b/src/plugins/projectexplorer/environmenteditmodel.cpp
@@ -31,6 +31,8 @@
 
 #include <utils/detailswidget.h>
 
+
+#include <QtGui/QTextDocument>
 #include <QtGui/QVBoxLayout>
 #include <QtGui/QHeaderView>
 #include <QtGui/QToolButton>
@@ -491,9 +493,9 @@ void EnvironmentWidget::updateSummaryText()
         if (item.name != EnvironmentModel::tr("<VARIABLE>")) {
             text.append("<br>");
             if (item.unset)
-                text.append(tr("Unset <b>%1</b>").arg(item.name));
+                text.append(tr("Unset <b>%1</b>").arg(Qt::escape(item.name)));
             else
-                text.append(tr("Set <b>%1</b> to <b>%2</b>").arg(item.name, item.value));
+                text.append(tr("Set <b>%1</b> to <b>%2</b>").arg(Qt::escape(item.name), Qt::escape(item.value)));
         }
     }
 
-- 
GitLab