From 40cbc6746cb809cae867cdf95c787896de178317 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 22 Aug 2012 21:48:34 +0200 Subject: [PATCH] analyzer: htlm-escape function names before showing them as html Templates tend to contain things like < and >. Change-Id: Ia947f6fd9d49df81aa1e9b5041ef2dabd75769f6 Reviewed-by: hjk --- src/plugins/valgrind/callgrind/callgrinddatamodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp b/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp index 700d1ea5d10..df3520af74d 100644 --- a/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp +++ b/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include namespace Valgrind { @@ -250,7 +251,7 @@ QVariant DataModel::data(const QModelIndex &index, int role) const // body, function info first ret += "
"; - ret += "
" + tr("Function:") + "
" + func->name() + "
\n"; + ret += "
" + tr("Function:") + "
" + Qt::escape(func->name()) + "
\n"; ret += "
" + tr("File:") + "
" + func->file() + "
\n"; if (!func->costItems().isEmpty()) { const CostItem *firstItem = func->costItems().first();