TL;DR
Detail
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.
Point to note: the DNS protocol seems to ignore this character. Pasting http://example.iana.org/ (which mapped to http://exa?mple.iana.?org/ when I tried it) into the browser will work fine.
The value is not a copy / paste artefact; it is in the DOM node value: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
0 comments:
Post a Comment