Opened 17 years ago
Closed 17 years ago
#10991 closed defect (bug) (fixed)
wp_loginout() encoding problem
| Reported by: | neoxx | Owned by: | westi |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9 |
| Component: | General | Version: | 2.8.4 |
| Severity: | normal | Keywords: | wp_loginout, encoding, user-feedback |
| Cc: | Focuses: |
Description
Hi,
Just a quick note: URLs containing a '+' (e.g. representing an and in a chain of tags) fail as redirect in wp_loginout() in Firefox. If tested the behavior in IE8 and Opera 10 and there it seems to work. Maybe the latter two are doing automatic url-encoding?
Anyway, I've used
str_replace('+', '%2B', $_SERVER['REQUEST_URI']);
as a quick-and-dirty fix but - if I'm right - I think we need something more decent.
greetz,
berny
Attachments (1)
Change History (6)
#2
@
17 years ago
Sure, using wp_loginout to redirect to /tags/tag1+tag2+tag3/ results in
http://www.mydomain.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.mydomain.com%2Ftags%2Ftag1+tag2+tag3%2F&_wpnonce=xxx
Firefox (3.5.5) removes the + and redirects to /tags/tag1tag2tag3/ which results in a 404.
When using the str_replace as mentioned above to replace the + with %2B prior to processing the link with wp_loginout, the function will produce the link below.
http://www.mydomain.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.mydomain.com%2Ftags%2Ftag1%252Btag2%252Btag3%2F&_wpnonce=xxx
This will generate a working redirect link like
http://www.mydomain.com/tags/tag1%2Btag2%2Btag3/
#3
@
17 years ago
The patch should fix this.
Pardon me if anything is wrong, it's my first patch for WP core. Not used to the procedure here.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Can you list how to recreate this bug?
Demonstrate, 'fail as redirect'