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;
|
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]);
|
$url = str_replace(array('&', '<'), array('&', '<'), $matches[0][0]);
|
||||||
|
|
||||||
|
@ -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>
|
@ -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>
|
Loading…
Reference in New Issue
Block a user