From a99be616162ea0706ebf4c01ae9e983a2cb04fb3 Mon Sep 17 00:00:00 2001 From: Juha Sippola Date: Wed, 5 Aug 2015 11:32:30 +0300 Subject: Qt Metrics 2 (v0.18): Url encoding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added url encoding for platform, testset and project links (if not already used). This solves html validator errors e.g. for testsets that have a space in their name. Change-Id: I98bd724df5e732d40f6e0e7e9d990487b4128cb2 Reviewed-by: Tony Sarajärvi --- non-puppet/qtmetrics2/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'non-puppet/qtmetrics2/index.php') diff --git a/non-puppet/qtmetrics2/index.php b/non-puppet/qtmetrics2/index.php index 367650d..909e1c0 100644 --- a/non-puppet/qtmetrics2/index.php +++ b/non-puppet/qtmetrics2/index.php @@ -457,7 +457,7 @@ if (isset($_POST["projectInputSubmit"])) { } if (isset($_POST["projectInputValue"])) { $project = htmlspecialchars($_POST['projectInputValue']); - header('Location: ' . Slim\Slim::getInstance()->urlFor('root') . 'testsetproject/' . $project); + header('Location: ' . Slim\Slim::getInstance()->urlFor('root') . 'testsetproject/' . urlencode($project)); exit(); } } @@ -475,7 +475,7 @@ if (isset($_POST["testsetInputSubmit"])) { $string = explode(' (in ', htmlspecialchars($_POST['testsetInputValue'])); // the separator must match with that used in testset_search.php $testset = $string[0]; $project = str_replace(')', '', $string[1]); - header('Location: ' . Slim\Slim::getInstance()->urlFor('root') . 'testset/' . $testset . '/' . $project); + header('Location: ' . Slim\Slim::getInstance()->urlFor('root') . 'testset/' . urlencode($testset) . '/' . urlencode($project)); exit(); } } -- cgit v1.2.3