Fixed a lot of responsive problems.

- Fixed auth problem
- Fixed BBCode and Markdown apparition in some unnecessary parts
This commit is contained in:
2026-07-01 11:51:30 +02:00
parent 55a8154b52
commit b422cd2c82
21 changed files with 403 additions and 38 deletions

View File

@@ -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');
}
}