From 5ea8dd6b7005c69cda8824197e8ec849e559207a Mon Sep 17 00:00:00 2001 From: Wikinaut Date: Mon, 14 Nov 2011 09:00:18 +0100 Subject: [PATCH] correcting the uri decoding, so that also non-ASCII characters are correctly shown in hml page titles --- static/js/pad2.js | 2 +- static/timeslider.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/pad2.js b/static/js/pad2.js index 9df57ae8f..28a9ac14c 100644 --- a/static/js/pad2.js +++ b/static/js/pad2.js @@ -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; diff --git a/static/timeslider.html b/static/timeslider.html index 48572d422..f95b33a67 100644 --- a/static/timeslider.html +++ b/static/timeslider.html @@ -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;