raamdev / wp-redirects

Redirects (a new Post Type) for WordPress®.
1 stars 2 forks source link

Backslashes being stripped from regex #7

Closed colinrotherham closed 10 years ago

colinrotherham commented 10 years ago

I'm running Wordpress 3.9.1 and I've noticed new Redirects are having their backslashes stripped out. Maybe this is a new security feature in Wordpress?

E.g. To match the /example/ path:

This regex…

regex: /\/example\/?/i

After saving, becomes…

regex: //example/?/i

This no longer matches so the redirect fails.

Is this a known issue? Thanks

raamdev commented 10 years ago

@colinrotherham Apologies for the very long delay in responding here. I just started maintaining this plugin so you shouldn't see this type of delay again. :)

The plugin has gone through a major overhaul code-wise in the development trunk. I just retested in attempt to reproduce the bug you describe here and I cannot reproduce it. Saving regex: /\/example\/?/i does not strip anything out.

I'm going to mark this issue as closed. We'll be doing a new release of WP-Redirects soon. If after upgrading you discover there is still an issue, please update here and I will investigate further.