Unslash the Request URI before matching #29

wants to merge 2 commits into


None yet

2 participants


Hi Taylor and co,

Here's another pull request for you. Those pesky slashes. :)



Commit notes:

Any single quotes, at least, in $_SERVER['REQUEST_URI'] are slashed, unlash them before matching

This means you can redirect from a URL like http://example.com/because-he's-worth-it/ to the WordPress escaped version which would be http://example.com/because-he%27s-worth-it/


What's the reasoning behind adding the full permalink equivalent for the 'from' path?


@danielbachhuber My bad, a misunderstanding of Pull Requests, I think. It's just this commit you want. Can you cherry pick, or should I create a branch with just the relevant code and submit a pull request from that.

(Sidenote, re having the 'from' path returned by the permalink: caching plugins controlling reverse caching proxies sometimes hook the save_post action to get the permalink from the post being edited and fire a cache purge request, this helps that process work… but it's unrelated to the slashing issue, though I might submit it as a suggestion later.)

@danielbachhuber danielbachhuber added a commit that closed this pull request Dec 8, 2012
@danielbachhuber danielbachhuber Any single quotes, at least, in `$_SERVER['REQUEST_URI']` are slashed…
…, unlash them before matching

Manual cherry pick of simonwheatley@809c565

Closes #29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment