diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php
index 65d037b83d..02c9551027 100644
--- a/src/Content/Text/BBCode.php
+++ b/src/Content/Text/BBCode.php
@@ -1475,24 +1475,22 @@ class BBCode extends BaseObject
$text = preg_replace("/\[font=(.*?)\](.*?)\[\/font\]/sm", "$2", $text);
// Declare the format for [spoiler] layout
- $SpoilerLayout = '
$1
';
+ $SpoilerLayout = '' . L10n::t('Click to open/close') . '
$1 ';
// Check for [spoiler] text
// handle nested quotes
$endlessloop = 0;
while ((strpos($text, "[/spoiler]") !== false) && (strpos($text, "[spoiler]") !== false) && (++$endlessloop < 20)) {
- $text = preg_replace("/\[spoiler\](.*?)\[\/spoiler\]/ism", "$SpoilerLayout", $text);
+ $text = preg_replace("/\[spoiler\](.*?)\[\/spoiler\]/ism", $SpoilerLayout, $text);
}
- // Check for [spoiler=Author] text
-
- $t_wrote = L10n::t('$1 wrote:');
+ // Check for [spoiler=Title] text
// handle nested quotes
$endlessloop = 0;
while ((strpos($text, "[/spoiler]")!== false) && (strpos($text, "[spoiler=") !== false) && (++$endlessloop < 20)) {
$text = preg_replace("/\[spoiler=[\"\']*(.*?)[\"\']*\](.*?)\[\/spoiler\]/ism",
- "
" . $t_wrote . "$2
",
+ '$1
$2 ',
$text);
}