Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^3: Monk Links - Copy Perlmonks-links to the clipboard in on-site-formatby ikegami (Patriarch) |
on Nov 01, 2006 at 18:28 UTC ( [id://581723]=note: print w/replies, xml ) | Need Help?? |
decodeURI "does not decode escape sequences that could not have been introduced by encodeURI." In other words, decodeURI won't return an invalid URI, like decoding %3A does or could do. You can't safely decode an entire URI. Each path segment, each attribute key and each attribute value must be isolated before they can be decoded. For example http%3A//www.google.com/ (a relative URI) and http://www.google.com/ (an absolute URI) are not equivalent. Not what you want:
What you want:
Since your code already extracts the compenent, simply use
In Section
Meditations
|
|