This commit is contained in:
Emanuil Rusev 2014-05-02 18:21:10 +03:00
parent e8d8801db4
commit cc94c1b584
3 changed files with 6 additions and 3 deletions

View File

@ -982,7 +982,7 @@ class Parsedown
return;
}
if (preg_match('/\bhttps?:[\/]{2}[^\s]+\b\/*/ui', $text, $matches, PREG_OFFSET_CAPTURE))
if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $text, $matches, PREG_OFFSET_CAPTURE))
{
$url = str_replace(array('&', '<'), array('&amp;', '&lt;'), $matches[0][0]);

View File

@ -1,4 +1,5 @@
<p>an <b>important</b> <a href=''>link</a></p>
<p>broken<br/>
line</p>
<p><b>inline tag</b> at the beginning</p>
<p><b>inline tag</b> at the beginning</p>
<p><span><a href="http://example.com">http://example.com</a></span></p>

View File

@ -3,4 +3,6 @@ an <b>important</b> <a href=''>link</a>
broken<br/>
line
<b>inline tag</b> at the beginning
<b>inline tag</b> at the beginning
<span>http://example.com</span>