Replace abstract content with a space to prevent missing spaces

This commit is contained in:
Michael 2022-03-08 19:58:55 +00:00
parent 4b6bbe3632
commit e0295abdab

View File

@ -2086,8 +2086,8 @@ class BBCode
public static function stripAbstract($text)
{
DI::profiler()->startRecording('rendering');
$text = preg_replace("/[\s|\n]*\[abstract\].*?\[\/abstract\][\s|\n]*/ism", '', $text);
$text = preg_replace("/[\s|\n]*\[abstract=.*?\].*?\[\/abstract][\s|\n]*/ism", '', $text);
$text = preg_replace("/[\s|\n]*\[abstract\].*?\[\/abstract\][\s|\n]*/ism", ' ', $text);
$text = preg_replace("/[\s|\n]*\[abstract=.*?\].*?\[\/abstract][\s|\n]*/ism", ' ', $text);
DI::profiler()->stopRecording();
return $text;