Fixed stripBbCode does not correctly handle bbcode with _ in the name

Affected version
2.1.3

Xon

Well-known member
In \XF\Str\Formatter::stripBbCode lines 743 & 768 the regex fragment [a-z0-9]+ is used to match a bb-code tag, while in line 729 [a-z0-9_]+ is used. Other bb-code tag validation allows _
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.4).

Change log:
Standardize on `\w` for BB code tag matching, rather than a mishmash of `[a-z0-9]` and `[a-z0-9_]`
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top