mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
remove $safe flag
This commit is contained in:
parent
2e4afde68d
commit
226f636360
@ -1547,20 +1547,14 @@ class Parsedown
|
||||
{
|
||||
if ($this->safeLinksEnabled)
|
||||
{
|
||||
$safe = false;
|
||||
|
||||
foreach ($this->safeLinksWhitelist as $scheme)
|
||||
{
|
||||
if (self::striAtStart($Element['attributes'][$attribute], $scheme))
|
||||
{
|
||||
$safe = true;
|
||||
|
||||
break;
|
||||
return $Element;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $safe)
|
||||
{
|
||||
$Element['attributes'][$attribute] = preg_replace_callback(
|
||||
'/[^\/#?&=%]++/',
|
||||
function (array $match)
|
||||
@ -1569,7 +1563,7 @@ class Parsedown
|
||||
},
|
||||
$Element['attributes'][$attribute]
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $Element;
|
||||
|
Loading…
Reference in New Issue
Block a user