Fixed Route filter - watched/threads can't be filtered to x/ as trailing slash is added

There was a check to ensure that the trailing slashes on the find and replace routes were the same. Looking back, it's been this way since before the first 1.2 beta was released -- actually very quickly after the system was written.

However, I'm trying to figure out what sort of bad circumstance would come up if this constraint were removed and nothing significant is jumping to mind. As such, I'll remove the limit with the caveat that if something comes up that's worse than not being able to add a route filter, we may have to replace it.
 
Ok, I stand corrected, there's a pretty easy way to break things with this: threads/{x}/ -> threads/{x}

That will lead to a situation where a URL like threads/123action will be generated, which makes the action unusable.
 
Right, I'm think I'm going to settle on splitting the difference: if your find route ends with a /, your replace route ends will be forced to end with a /. This allows the watched/threads -> prefix/ case while also eliminating the problem mentioned in my previous post. (If you do threads/{x} -> threads/{x}/, the everything still works -- you just get some extra slashes.)
 
Top Bottom