I have a reacurring problem. I code nice standards compliant code only to have it fail due to ampersands within some of the hyperlink urls.
Does anyone know of a work around or hack for this.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should URL Encode the hyperlinks, so all characters are turned into a valid ASCII format and don’t contain any (X)HTML entities.
For C# use
HttpUtility.UrlEncode, for PHPurlencode, for JavaScriptencodeURI, etc… Finding the right method for the language you’re using shouldn’t be that hard.