Skip to content

Commit 45c6d29

Browse files
committed
fixed url parsing with google plus #124
1 parent 8817d4c commit 45c6d29

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Url.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ private function setPath($path)
542542
$this->info['path'] = [];
543543

544544
foreach (explode('/', $path) as $dir) {
545-
$dir = trim(urldecode($dir));
545+
$dir = urldecode($dir);
546546

547547
if ($dir !== '') {
548548
$this->info['path'][] = $dir;

tests/UrlTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public function urlsParserProvider()
1414
['https://www.tumblr.com/oembed//1.0//', 'https://www.tumblr.com/oembed/1.0/'],
1515
['https://animoto.com/oembeds/create.xml?automated=true&options=start_hq', 'https://animoto.com/oembeds/create.xml?automated=true&options=start_hq'],
1616
['http://static2.politico.com/dims4/default/28fb355/2147483647/resize/1160x%3E/quality/90/?url=http%3A%2F%2Fs3-origin-images.politico.com%2F2013%2F12%2F18%2F131218_george_w_bush_barack_obama_ap_60', 'http://static2.politico.com/dims4/default/28fb355/2147483647/resize/1160x%3E/quality/90/?url=http%3A%2F%2Fs3-origin-images.politico.com%2F2013%2F12%2F18%2F131218_george_w_bush_barack_obama_ap_60'],
17+
['https://plus.google.com/+carlsenverlag/posts/2hibgWrmhp1', 'https://plus.google.com/+carlsenverlag/posts/2hibgWrmhp1'],
1718
];
1819
}
1920

0 commit comments

Comments
 (0)