1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00
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; 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]); $url = str_replace(array('&', '<'), array('&amp;', '&lt;'), $matches[0][0]);

View File

@ -2,3 +2,4 @@
<p>broken<br/> <p>broken<br/>
line</p> 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

@ -4,3 +4,5 @@ broken<br/>
line line
<b>inline tag</b> at the beginning <b>inline tag</b> at the beginning
<span>http://example.com</span>