Steps to reproduce:
- Visit a website:
- Copy the URL and send it to your Gmail account as the subject line.
- Open your Gmail account and copy the URL from the email you just sent yourself:
- Paste this URL into your browser's address bar.
- See the result:
Why does this happen?
It seems that Google must be inserting a special character called a Zero Width Space (Unicode 8203) at certain positions in the URL to prevent copying and pasting. I can only presume that this is some kind of security measure. For example, the URL I used in this example actually looked like this behind the scenes: http://www.iana.org/?domains/re?served, where the question marks (?) are the special zero width space characters.
document.getElementById(':np').firstChild.nodeValue "http://www.iana.org/domains/reserved" document.getElementById(':np').firstChild.nodeValue.length 39 'http://www.iana.org/domains/reserved'.length 36