aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template/asset.php
diff options
context:
space:
mode:
authorVjacheslav Trushkin <cyberalien@gmail.com>2013-07-11 18:13:48 -0400
committerVjacheslav Trushkin <cyberalien@gmail.com>2013-07-11 18:13:48 -0400
commitf5c2119e7cd0359614300be9a2bd116965a1ec7c (patch)
tree49d6a7e2cf35d826ed0780bdcf0d3090e9651b7c /phpBB/includes/template/asset.php
parent94fc0cccdc49962e3111e291de8800a0d2d50837 (diff)
downloadforums-f5c2119e7cd0359614300be9a2bd116965a1ec7c.tar
forums-f5c2119e7cd0359614300be9a2bd116965a1ec7c.tar.gz
forums-f5c2119e7cd0359614300be9a2bd116965a1ec7c.tar.bz2
forums-f5c2119e7cd0359614300be9a2bd116965a1ec7c.tar.xz
forums-f5c2119e7cd0359614300be9a2bd116965a1ec7c.zip
[ticket/11647] Always use &amp; for URLs
Remove code for URLs separated with ; Add test case for mix of & and &amp; in URLs PHPBB3-11647
Diffstat (limited to 'phpBB/includes/template/asset.php')
-rw-r--r--phpBB/includes/template/asset.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/includes/template/asset.php b/phpBB/includes/template/asset.php
index 99ac1f0ca7..7c322cd971 100644
--- a/phpBB/includes/template/asset.php
+++ b/phpBB/includes/template/asset.php
@@ -40,7 +40,7 @@ class phpbb_template_asset
{
// Workaround for PHP 5.4.6 and older bug #62844 - add fake scheme and then remove it
$this->components = parse_url('http:' . $url);
- unset($this->components['scheme']);
+ $this->components['scheme'] = '';
return;
}
$this->components = parse_url($url);
@@ -176,8 +176,7 @@ class phpbb_template_asset
$query = $this->components['query'];
if (!preg_match('/(^|[&;])assets_version=/', $query))
{
- $separator = (strpos($query, '&') === false) && (strpos($query, ';') !== false) && preg_match('/^.*=.*;.*=.*$/', $query) ? ';' : '&amp;';
- $this->components['query'] = $query . $separator . 'assets_version=' . $version;
+ $this->components['query'] = $query . '&amp;assets_version=' . $version;
}
}
}