diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-10-27 17:41:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 17:41:04 +0300 |
commit | 1e004044e95eec60906f6ba691f8a6f050074adf (patch) | |
tree | 816ac6b3641193f2e9cb6c488e516ffe9f2da26c /tests/PHPUnit/Unit | |
parent | 88cbc95b7c96e13d67cc35b88f43f8e6c81dc571 (diff) |
Always remove hash part from URL when detecting the script name (#18204)
* Always remove hash part from URL when detecting the script name
* use mb_ string methods
* also escape ip
* fix login ui test
Diffstat (limited to 'tests/PHPUnit/Unit')
-rw-r--r-- | tests/PHPUnit/Unit/UrlTest.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/PHPUnit/Unit/UrlTest.php b/tests/PHPUnit/Unit/UrlTest.php index b1e18568db..336eff2757 100644 --- a/tests/PHPUnit/Unit/UrlTest.php +++ b/tests/PHPUnit/Unit/UrlTest.php @@ -14,6 +14,7 @@ use Piwik\Url; /** * @backupGlobals enabled * @group Core + * @group UrlTest */ class UrlTest extends \PHPUnit\Framework\TestCase { @@ -255,6 +256,7 @@ class UrlTest extends \PHPUnit\Framework\TestCase array('/index.php', '/index.php', null), array('/index.php', '/index.php?module=Foo', null), array('/index.php', '/index.php/route/1', '/route/1'), + array('/index.php', '/index.php#<img src=http://matomo.org', ''), array('/index.php', '/index.php/route/2?module=Bar', '/route/2'), array('/path/index.php', '/path/index.php/route/3/?module=Fu&action=Bar#Hash', '/route/3/'), ); |