Fixed Editor::actionDialog regex doesn't match allowed bb-code definitions

Xon

Well-known member
Affected version
2.2.12
XF\Pub\Controller\Editor::actionDialog is invoked by the front-end XF.EditorHelpers.loadDialog function which often tags a bb-code tag and then returns a dialog for it.

However actionDialog uses the regex '/[^a-zA-Z0-9]/' while a bb-codes use the regex /^[a-z0-9_]*$/i.

This means _ is stripped from the argument when calling XF\Pub\Controller\Editor::loadDialog makes matching to the exact bb-code much harder than it should be (as it isn't possible to determine if a dialog for bbcode_a and bbcodea or is being requested).
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.14).

Change log:
Adjust regex for dialog loading to ensure consistency with BB code tag naming.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom