[wp-hackers] Unicode url rewriting using add_rewrite_rule()
Otto
otto at ottodestruct.com
Thu Dec 13 15:15:46 UTC 2012
On Thu, Dec 13, 2012 at 7:29 AM, Deepak Mittal <dpac.mittal2 at gmail.com> wrote:
> Sorry, one more thing. If you change the code to :
>
> if ( preg_match("#^$match#", $request_match, $matches) ||
> preg_match("#^$match#u", urldecode($request_match), $matches) ) {
>
> unicode URLs start working (notice the 'u' modifier).
Right, but there is no way to do that without hacking core. There's no
option for that.
And it's not necessary anyway, because the first preg_match is getting
the URL undecoded, and so you can match against the actual URL, with
percents and all, there.
-Otto
More information about the wp-hackers
mailing list