fix issue #24 en attendant mieux regex

This commit is contained in:
Mitsukarenai 2013-04-25 13:02:33 +02:00
parent e982da76b7
commit d7675c0edb

View file

@ -498,11 +498,11 @@ class VroumVroum_Blog
$from['path'] = '';
}
preg_match_all('!(src|href)\s*=\s*[\'"]?([^"\'<>\s]+\.(?:'.$extensions.'))[\'"]?!i', $content, $match, PREG_SET_ORDER);
preg_match_all('!(src|href)\s*=\s*[\'"]?([^"\'<>\s]+\.(?:'.$extensions.')[\'"])[\'"]?!i', $content, $match, PREG_SET_ORDER);
foreach ($match as $m)
{
$url = parse_url($m[2]);
$url = parse_url(substr($m[2], 0, -1));
if (empty($url['scheme']))
$url['scheme'] = $from['scheme'];