var s = encodeURI(title);
The URL that the extension processes is: http://de.wikipedia.org/wiki/Robert_Louis_Stevenson
title is tab.title from the active tab.
The console output is:
title: Robert Louis Stevenson – Wikipedia
My question is, why is the minus char "-" converted to %E2%80%93 in this case? What does this mean?
If I try the same code on a different URL, for example the same Wikipedia page in English instead of German: http://en.wikipedia.org/wiki/Robert_Louis_Stevenson
the output is like this:
title: Robert Louis Stevenson - Wikipedia, the free encyclopedia
This time the minus char "-" is not converted at all.
I guess it may have something to do with a Unicode convertion, but both these pages are encoded with UTF-8 according to the page sources.
So all in all I want to know the exact meaning why a minus char is converted to E2%80%93% in encodeURI().