Fixed Strip BB-code not striping custom bbcode

Thanks, this wasn't really related to custom BB code it was just that it didn't take into account the underscore character when matching.
Diff:
diff --git a/src/XF/Str/Formatter.php b/src/XF/Str/Formatter.php
index ec55931035..f55bd517f1 100644
--- a/src/XF/Str/Formatter.php
+++ b/src/XF/Str/Formatter.php
@@ -595,7 +595,7 @@ public function stripBbCode($string, array $options = [])
 		);
 
 		// split the string into possible delimiters and text; even keys (from 0) are strings, odd are delimiters
-		$parts = preg_split('#(\[[a-z0-9]+(?:=[^\]]*)?\]|\[/[a-z0-9]+\])#si', $string, -1, PREG_SPLIT_DELIM_CAPTURE);
+		$parts = preg_split('#(\[[a-z0-9_]+(?:=[^\]]*)?\]|\[/[a-z0-9_]+\])#si', $string, -1, PREG_SPLIT_DELIM_CAPTURE);
 		$total = count($parts);
 		if ($total < 2)
 		{
 
Back
Top Bottom