url elements should not be restricted to http

This commit is contained in:
Emanuil Rusev 2015-01-16 02:31:58 +02:00
parent 3b4aa6bff7
commit 2cbd3010e4
1 changed files with 1 additions and 1 deletions

View File

@ -1169,7 +1169,7 @@ class Parsedown
protected function inlineUrlTag($excerpt)
{
if (strpos($excerpt, '>') !== false and preg_match('/^<(https?:[\/]{2}[^\s]+?)>/i', $excerpt, $matches))
if (strpos($excerpt, '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $excerpt, $matches))
{
$url = str_replace(array('&', '<'), array('&amp;', '&lt;'), $matches[1]);