html - Link doesn't work when href attribute value is url encoded -
why link doesn't work when href attribute value url encoded?
are not supposed encode it? same behavior observed in chrome & ff
works
<!doctype html> <html> <body> <p>sweet fruit: <a href="http://google.com/search?q=banana">banana</a></p> </body> </html>
doesn't work
<!doctype html> <html> <body> <p>sweet fruit<a href="http%3a%2f%2fgoogle.com%2fsearch%3fq%3dbanana">banana</a></p> </body> </html>
its protected link. how encode works http://www.w3schools.com/tags/ref_urlencode.asp
this link u showed first 1 decoded , second 1 encoded .
http://google.com/search?q=banana http%3a%2f%2fgoogle.com%2fsearch%3fq%3dbanana
lets take look
in case "/" becomes %2f, "?" %3f , "=" %3d
its protection , link can not used. dns cant read it. , see first link clickable , second 1 not.
Comments
Post a Comment