1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

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

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]);