Merge pull request #11306 from annando/abstract-space

Replace abstract content with a space to prevent missing spaces
This commit is contained in:
Hypolite Petovan 2022-03-08 15:52:48 -05:00 committed by GitHub
commit 0f9a239d59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;