mirror of
https://github.com/kevachat/webapp.git
synced 2025-01-25 14:04:14 +00:00
fix markdown filters overwrite
This commit is contained in:
parent
b79a6be977
commit
834a02edc0
@ -193,7 +193,7 @@ class AppExtension extends AbstractExtension
|
|||||||
): string
|
): string
|
||||||
{
|
{
|
||||||
return preg_replace(
|
return preg_replace(
|
||||||
'~(https?://(?:www\.)?[^\(\s\)]+)~i',
|
'/(https?:\/\/(?:www\.)?[^\(\s\)]+)/i',
|
||||||
'[$1]($1)',
|
'[$1]($1)',
|
||||||
$text
|
$text
|
||||||
);
|
);
|
||||||
@ -204,7 +204,7 @@ class AppExtension extends AbstractExtension
|
|||||||
): string
|
): string
|
||||||
{
|
{
|
||||||
return preg_replace(
|
return preg_replace(
|
||||||
'~@([A-z0-9]{64})~i',
|
'/@([A-f0-9]{64})/i',
|
||||||
'[@$1](#$1)',
|
'[@$1](#$1)',
|
||||||
$text
|
$text
|
||||||
);
|
);
|
||||||
@ -215,7 +215,7 @@ class AppExtension extends AbstractExtension
|
|||||||
): string
|
): string
|
||||||
{
|
{
|
||||||
// Search not filtered namespaces
|
// Search not filtered namespaces
|
||||||
if (preg_match_all('~(N[A-z0-9]{33})~', $text, $matches))
|
if (preg_match_all('/(^(?!\/)N[A-z0-9]{33})/', $text, $matches))
|
||||||
{
|
{
|
||||||
if (empty($matches[1]))
|
if (empty($matches[1]))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user