Unified BBCode conversion, improved proxy functionality

This commit is contained in:
Michael 2023-07-15 20:12:08 +00:00
parent 81d2d4b70e
commit 8bb33dccd1
22 changed files with 61 additions and 35 deletions

View file

@ -312,8 +312,7 @@ class OEmbed
*/
public static function BBCode2HTML(string $text): string
{
$stopoembed = DI::config()->get('system', 'no_oembed');
if ($stopoembed == true) {
if (DI::config()->get('system', 'no_oembed')) {
return preg_replace("/\[embed\](.+?)\[\/embed\]/is", "<!-- oembed $1 --><i>" . DI::l10n()->t('Embedding disabled') . " : $1</i><!-- /oembed $1 -->", $text);
}
return preg_replace_callback("/\[embed\](.+?)\[\/embed\]/is", [self::class, 'replaceCallback'], $text);