correcting the uri decoding, so that also non-ASCII characters are correctly shown in hml page titles

This commit is contained in:
Wikinaut 2011-11-14 09:00:18 +01:00
parent 4e104e8c83
commit 5ea8dd6b70
2 changed files with 2 additions and 2 deletions

View file

@ -172,7 +172,7 @@ function handshake()
socket.once('connect', function()
{
var padId = document.location.pathname.substring(document.location.pathname.lastIndexOf("/") + 1);
padId = unescape(padId); // unescape neccesary due to Safari and Opera interpretation of spaces
padId = decodeURIComponent(padId); // unescape neccesary due to Safari and Opera interpretation of spaces
document.title = document.title + " | " + padId;

View file

@ -62,7 +62,7 @@
//get the padId out of the url
var urlParts= document.location.pathname.split("/");
padId = urlParts[urlParts.length-2];
padId = decodeURIComponent(urlParts[urlParts.length-2]);
//set the title
document.title = document.title + " | " + padId;