summaryrefslogtreecommitdiffstats
path: root/non-puppet/qtmetrics2/index.php
diff options
context:
space:
mode:
authorJuha Sippola <juhasippola@outlook.com>2015-08-05 11:32:30 +0300
committerTony Sarajärvi <tony.sarajarvi@theqtcompany.com>2015-09-16 07:34:36 +0000
commita99be616162ea0706ebf4c01ae9e983a2cb04fb3 (patch)
tree058f9370a5b0adc93cde1da5d573e386b849fea9 /non-puppet/qtmetrics2/index.php
parent18f934238b78b7c8bdb9f4965f7fd5fef2fed218 (diff)
Qt Metrics 2 (v0.18): Url encoding
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 <tony.sarajarvi@theqtcompany.com>
Diffstat (limited to 'non-puppet/qtmetrics2/index.php')
-rw-r--r--non-puppet/qtmetrics2/index.php4
1 files changed, 2 insertions, 2 deletions
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();
}
}