Not a bug XenForo_Router::resolveActionWithStringParam removes slashes from route path...

Mr. Goodie2Shoes

Well-known member
This isn't a bug or anything, and may work without any issue but this messes up one of my add-on's routing. I think it wont hurt to add '/' during imploding the components together. :)
 
Last edited:
I created a system that allows adding multiple data inside a route path.

For example: "admin.php?add-ons/{$addon_id}/versions/{$version_id}/edit"

So when the reouter fetches the addon_id from the path the action that is returned is "versions{$version_id}edit" and the next routing phase fails. But adding '/' in the implode function fixes the issue.

I do know this is how it was designed. :)
 
As you've noted a couple times, this is as designed. The return value is an action so it can be any value that could be manipulated to be an action (which comes down to A-Z 0-9 _ mostly). Anything outside that range shouldn't be relied upon.
 
Top Bottom