Permalink
Browse files

Merge pull request #297 from romainjanvier/master

Fix double url decode of query params
  • Loading branch information...
oscarotero committed Nov 26, 2018
2 parents 9666691 + 480fdca commit d8e62333dd7e1ba95036860de315bc6d11f5e9b1
Showing with 3 additions and 6 deletions.
  1. +0 −4 src/Http/Url.php
  2. +1 −1 tests/PinterestTest.php
  3. +1 −0 tests/UrlTest.php
  4. +1 −1 tests/YoutubeTest.php
@@ -540,10 +540,6 @@ protected function parseUrl($url)
foreach ((array) $query as $key => $value) {
$this->info['query'][hex2bin($key)] = $value;
}
array_walk_recursive($this->info['query'], function (&$value) {
$value = urldecode($value);
});
}
/**
@@ -9,7 +9,7 @@ public function testOne()
$this->assertEmbed(
'https://www.pinterest.com/pin/106890191127977979/',
[
'title' => 'Pin by Leslie Carruthers on Icons | Pinterest | Jack nicholson, Actors and Movies',
'title' => 'Pin by Leslie Carruthers on Icons | Pinterest | Jack nicholson, Actors and Celebrities',
'width' => 236,
'height' => 442,
'code' => '<a data-pin-do="embedPin" data-pin-lang="es" href="https://www.pinterest.com/pin/106890191127977979/"></a><script async defer src="//assets.pinterest.com/js/pinit.js"></script>',
@@ -26,6 +26,7 @@ public function urlsParserProvider()
['http://www.innherred.no/kultur/2017/03/25/On-the-road-med-%C3%86-og-Hagen-14499028.ece', 'http://www.innherred.no/kultur/2017/03/25/On-the-road-med-%C3%86-og-Hagen-14499028.ece'],
['https://pbs.twimg.com/media/CvCZ90BXYAE5q80.png:large', 'https://pbs.twimg.com/media/CvCZ90BXYAE5q80.png:large'],
['http://img.bibo.kz/?7142389.jpg', 'http://img.bibo.kz/?7142389.jpg'],
['https://twitter.com/search?q=google%2B&src=typd&lang=en', 'https://twitter.com/search?q=google%2B&src=typd&lang=en'],
];
}
@@ -60,7 +60,7 @@ public function testPlayList()
'imageWidth' => 480,
'imageHeight' => 360,
'type' => 'video',
'code' => '<iframe width="480" height="270" src="https://www.youtube.com/embed/videoseries?list=PL4qTakKkQATKOyZPJG_cAMnRtF7fAIdST" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>',
'code' => '<iframe width="480" height="270" src="https://www.youtube.com/embed/videoseries?list=PL4qTakKkQATKOyZPJG_cAMnRtF7fAIdST" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
'authorName' => 'Scadrei5',
]
);

0 comments on commit d8e6233

Please sign in to comment.