less regex
This commit is contained in:
parent
583b0b5eb4
commit
f3014e4e1e
@ -133,7 +133,8 @@ class BBCode extends FormatterExtension {
|
|||||||
# at the end of this function, the only code! blocks should be
|
# at the end of this function, the only code! blocks should be
|
||||||
# the ones we've added -- others may contain malicious content,
|
# the ones we've added -- others may contain malicious content,
|
||||||
# which would only appear after decoding
|
# which would only appear after decoding
|
||||||
$text = preg_replace("/\[code!\](.*?)\[\/code!\]/s", "[code]\\1[/code]", $text);
|
$text = str_replace("[code!]", "[code]", $text);
|
||||||
|
$text = str_replace("[/code!]", "[/code]", $text);
|
||||||
|
|
||||||
$l1 = strlen("[code]");
|
$l1 = strlen("[code]");
|
||||||
$l2 = strlen("[/code]");
|
$l2 = strlen("[/code]");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user