mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
resolve #167
This commit is contained in:
parent
e8d8801db4
commit
cc94c1b584
@ -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('&', '<'), $matches[0][0]);
|
||||
|
||||
|
@ -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>
|
@ -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>
|
Loading…
Reference in New Issue
Block a user