diff options
author | Vjacheslav Trushkin <cyberalien@gmail.com> | 2013-07-11 18:13:48 -0400 |
---|---|---|
committer | Vjacheslav Trushkin <cyberalien@gmail.com> | 2013-07-11 18:13:48 -0400 |
commit | f5c2119e7cd0359614300be9a2bd116965a1ec7c (patch) | |
tree | 49d6a7e2cf35d826ed0780bdcf0d3090e9651b7c /phpBB/includes/template/asset.php | |
parent | 94fc0cccdc49962e3111e291de8800a0d2d50837 (diff) | |
download | forums-f5c2119e7cd0359614300be9a2bd116965a1ec7c.tar forums-f5c2119e7cd0359614300be9a2bd116965a1ec7c.tar.gz forums-f5c2119e7cd0359614300be9a2bd116965a1ec7c.tar.bz2 forums-f5c2119e7cd0359614300be9a2bd116965a1ec7c.tar.xz forums-f5c2119e7cd0359614300be9a2bd116965a1ec7c.zip |
[ticket/11647] Always use & for URLs
Remove code for URLs separated with ;
Add test case for mix of & and & in URLs
PHPBB3-11647
Diffstat (limited to 'phpBB/includes/template/asset.php')
-rw-r--r-- | phpBB/includes/template/asset.php | 5 |
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) ? ';' : '&'; - $this->components['query'] = $query . $separator . 'assets_version=' . $version; + $this->components['query'] = $query . '&assets_version=' . $version; } } } |