Fixed Passing some entity short names into the max_length() template function does not work

Jeremy P

XenForo developer
Staff member
Affected version
When passing an entity short-name with a vendor namespace, the max_length() template function fails to match it against the regex \^\w+(?:\\\w+)?:\w+$/i.

It looks as though it should match, so I'm not sure if this is some sort of PHP bug or if there's something else I'm not seeing. This is on PHP 7.2.14.
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.1).

Change log:
Use a sufficient number of backslashes (5!) to appropriately escape the fnMaxLength templater function shortname regex.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
Top Bottom