Fixed XenForo Redirects for vBulletin doesn't like URLs containing an exclamation point

Affected version
1.1.3

Jake B.

Well-known member
It looks like this isn't properly handling URLs that contain a !. For example:

https://domain.com/threads/12345-thread-title!

Also, it seems to be broken for member URLs:

https://domain.com/members/12345-User_name
 

Jake B.

Well-known member
Seems like there are URLs in vBulletin that contain other punctuation as well, so far I've encountered: !, ( and ). Changing line 261 in Router.php from:

PHP:
$regexMatch = '/\/' . $action . '(?:\/(?P<content_id>\d+)-[a-z0-9-]+(?:\/|\?|$))(?:page(?P<page>\d+))?/i';
to
PHP:
$regexMatch = '/\/' . $action . '(?:\/(?P<content_id>\d+)-[a-z0-9-!\(\)]+(?:\/|\?|$))(?:page(?P<page>\d+))?/i';
seems to have resolved most of what I've run into but I'm sure there are others, so may be worth addressing this in a bit of a different way
 
Top