From 2cbd3010e4cc879775cf52fc64ac6fcf5aff4539 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Fri, 16 Jan 2015 02:31:58 +0200 Subject: [PATCH] url elements should not be restricted to http --- Parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parsedown.php b/Parsedown.php index 46d0715..f61cfa8 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -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('&', '<'), $matches[1]);