mirror of
https://github.com/getgrav/grav.git
synced 2026-07-13 14:22:46 +02:00
Remove double URL encode when processing params in links - #860
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
* Detect if user really meant to extend parent blueprint, not another one (fixes old page type blueprints)
|
||||
* Fixed a bug in `Page::relativePagePath()` when `Page::$name` is not defined
|
||||
* Fix for poor handling of params + query element in `Uri::processParams()` [#859](https://github.com/getgrav/grav/issues/859)
|
||||
* Fix for double encoding in markdown links [#860](https://github.com/getgrav/grav/issues/860)
|
||||
|
||||
# v1.1.0-beta.5
|
||||
## 05/23/2016
|
||||
|
||||
@@ -300,7 +300,7 @@ trait ParsedownGravTrait
|
||||
if (isset($url['query'])) {
|
||||
$actions = array_reduce(explode('&', $url['query']), function ($carry, $item) {
|
||||
$parts = explode('=', $item, 2);
|
||||
$value = isset($parts[1]) ? $parts[1] : true;
|
||||
$value = isset($parts[1]) ? rawurldecode($parts[1]) : true;
|
||||
$carry[$parts[0]] = $value;
|
||||
|
||||
return $carry;
|
||||
|
||||
@@ -289,6 +289,8 @@ class ParsedownTest extends \Codeception\TestCase\Test
|
||||
$this->parsedown->text('[cnn.com](http://www.cnn.com)'));
|
||||
$this->assertSame('<p><a href="https://www.google.com">google.com</a></p>',
|
||||
$this->parsedown->text('[google.com](https://www.google.com)'));
|
||||
$this->assertSame('<p><a href="https://github.com/getgrav/grav/issues/new?title=%5Badd-resource%5D%20New%20Plugin%2FTheme&body=Hello%20%2A%2AThere%2A%2A">complex url</a></p>',
|
||||
$this->parsedown->text('[complex url](https://github.com/getgrav/grav/issues/new?title=[add-resource]%20New%20Plugin/Theme&body=Hello%20**There**)'));
|
||||
}
|
||||
|
||||
public function testExternalLinksSubDir()
|
||||
|
||||
Reference in New Issue
Block a user