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
path: root/misc
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 /misc
parenta2e369e10d0cdc314540b5d3e4fe0da08e6cc7c5 (diff)
force using utf-8 as charset for htmlentities/htmlspecialchars (#12135)
Diffstat (limited to 'misc')
-rw-r--r--misc/others/api_rest_call.php2
-rw-r--r--misc/others/tracker_simpleImageTracker.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/misc/others/api_rest_call.php b/misc/others/api_rest_call.php
index 67c3f9e4ba..b6275f8755 100644
--- a/misc/others/api_rest_call.php
+++ b/misc/others/api_rest_call.php
@@ -22,7 +22,7 @@ if (!$content) {
print("<h1>Keywords for the last month</h1>\n");
foreach ($content as $row) {
- $keyword = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
+ $keyword = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8');
$hits = $row['nb_visits'];
print("<b>$keyword</b> ($hits hits)<br>\n");
diff --git a/misc/others/tracker_simpleImageTracker.php b/misc/others/tracker_simpleImageTracker.php
index 6bcaf21fd1..2f10fe279d 100644
--- a/misc/others/tracker_simpleImageTracker.php
+++ b/misc/others/tracker_simpleImageTracker.php
@@ -24,7 +24,7 @@ $trackingURL = Piwik_getUrlTrackPageView($idSite = 16, $customTitle = 'This titl
This page loads a Simple Tracker request to Piwik website id=1
<?php
-echo '<img src="' . htmlentities($trackingURL) . '" alt="" />';
+echo '<img src="' . htmlentities($trackingURL, ENT_COMPAT | ENT_HTML401, 'UTF-8') . '" alt="" />';
?>
</body>
</html> \ No newline at end of file