Fixed a lot of responsive problems.
- Fixed auth problem - Fixed BBCode and Markdown apparition in some unnecessary parts
This commit is contained in:
@@ -125,4 +125,18 @@ class EntryHelpers {
|
||||
session(["downloaded_file_{$entryFile->file_uuid}" => 1]);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function stripBbCode(?string $text): ?string
|
||||
{
|
||||
if ($text === null) return null;
|
||||
$text = preg_replace('/\[quote\b[^\]]*\](.*?)\[\/quote\]/is', '', $text);
|
||||
return preg_replace('/\[\/?\w+[^\]]*\]/i', '', $text);
|
||||
}
|
||||
|
||||
public static function stripMarkdown(?string $text): ?string
|
||||
{
|
||||
if ($text === null) return null;
|
||||
$html = Str::markdown($text);
|
||||
return html_entity_decode(strip_tags($html), ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user