mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
fix double-encoding of external urls
This commit is contained in:
parent
5f0e0963db
commit
b32edfe378
2 changed files with 6 additions and 1 deletions
|
@ -333,6 +333,10 @@ class HtmlHelperTest extends CakeTestCase {
|
|||
'/a'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Html->link('http://www.example.org?param1=value1¶m2=value2');
|
||||
$expected = array('a' => array('href' => 'http://www.example.org?param1=value1&param2=value2'), 'http://www.example.org?param1=value1&param2=value2', '/a');
|
||||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -335,7 +335,8 @@ class HtmlHelper extends AppHelper {
|
|||
$url = $this->url($url);
|
||||
} else {
|
||||
$url = $this->url($title);
|
||||
$title = h(urldecode($url));
|
||||
$title = htmlspecialchars_decode($url, ENT_QUOTES);
|
||||
$title = h(urldecode($title));
|
||||
$escapeTitle = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue