URL with encoded @ sign (%40) sent to Hotmail gets converted to @ in URL
I have simple PHP code that sends a URL to a user via email with an email address included in the URL. I have used rawurlencode() to encode the email address before it gets sent out.开发者_StackOverflow中文版
The email client (Hotmail in this case) shows the URL correctly with the @ sign encoded as %40. However when I click on the link, the browser converts to @ again resulting in a malformed URL.
Any suggestions on how to ensure the email client or browser (not sure who the culprit is) doesn't decode the %40 in the URL to an @ sign? See code below.
$resetlink = "http://www.domain.com/resetpassword/".rawurlencode($email)."/".$email_hash;
Well, I don't know if this is what you meant, but you could do something like %2540...
for example:
http://www.google.com/search?q=%2540
http://www.google.com/search?q=%40
精彩评论