Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@piwik.org>2017-10-04 23:27:31 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2017-10-04 23:27:31 +0300
commit557571b23b39e4f087cbddaa7afd5417ae11422a (patch)
treee37b34f27d52098732631453e49339624c51ebd2 /tests/PHPUnit
parenta2e369e10d0cdc314540b5d3e4fe0da08e6cc7c5 (diff)
force using utf-8 as charset for htmlentities/htmlspecialchars (#12135)
Diffstat (limited to 'tests/PHPUnit')
-rw-r--r--tests/PHPUnit/System/AutoSuggestAPITest.php2
-rw-r--r--tests/PHPUnit/System/LabelFilterTest.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/PHPUnit/System/AutoSuggestAPITest.php b/tests/PHPUnit/System/AutoSuggestAPITest.php
index 8a3900cf8d..414dfccd5f 100644
--- a/tests/PHPUnit/System/AutoSuggestAPITest.php
+++ b/tests/PHPUnit/System/AutoSuggestAPITest.php
@@ -104,7 +104,7 @@ class AutoSuggestAPITest extends SystemTestCase
$topSegmentValue = Common::forceDotAsSeparatorForDecimalPoint($topSegmentValue);
}
// Now build the segment request
- $segmentValue = rawurlencode(html_entity_decode($topSegmentValue));
+ $segmentValue = rawurlencode(html_entity_decode($topSegmentValue, ENT_COMPAT | ENT_HTML401, 'UTF-8'));
$params['segment'] = $params['segmentToComplete'] . '==' . $segmentValue;
unset($params['segmentToComplete']);
$this->runApiTests($api, $params);
diff --git a/tests/PHPUnit/System/LabelFilterTest.php b/tests/PHPUnit/System/LabelFilterTest.php
index 809409754b..f19828638d 100644
--- a/tests/PHPUnit/System/LabelFilterTest.php
+++ b/tests/PHPUnit/System/LabelFilterTest.php
@@ -113,7 +113,7 @@ class LabelFilterTest extends SystemTestCase
);
$return[] = array('Referrers.getSearchEngines', $searchEngineTest);
- $searchEngineTest['otherRequestParameters']['label'] = urlencode('Google>' . urlencode(html_entity_decode($keyword)));
+ $searchEngineTest['otherRequestParameters']['label'] = urlencode('Google>' . urlencode(html_entity_decode($keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8')));
$return[] = array('Referrers.getSearchEngines', $searchEngineTest);
// test the ! operator