From bda20a38a46ee159d802f3aa9952c85326af84a6 Mon Sep 17 00:00:00 2001 From: Wikinaut Date: Thu, 10 Nov 2011 22:37:48 +0100 Subject: [PATCH] patch to allow user-added prefixes and modification to random pad names; correctly process uri-encoded utf-8 characters in pad names and page titles --- static/favicon.ico | Bin 1150 -> 1150 bytes static/index.html | 40 +++++++++++++++++++++++++++------------- static/js/pad2.js | 2 +- static/timeslider.html | 2 +- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/static/favicon.ico b/static/favicon.ico index 2529c923f30e7ad806630c1ec40c4ca9db439d64..a4777862b46721026e1fcddf3c6534cfb3a9e046 100644 GIT binary patch delta 132 zcmeyz@sDFe9uxon{|x_;@Z?%1LkzLKSj7Hf5wm5+)LYAJD1c->*sjS385<_su{Zz# D_eM|v delta 132 zcmeyz@sDFe9uq&qf1dwHcycY1A%@sqEMkALh}kk@>aArq6hJZ`Y}e$2j180RSR4T7 Cj5#;} diff --git a/static/index.html b/static/index.html index fb53acb20..3b3944cc2 100644 --- a/static/index.html +++ b/static/index.html @@ -89,18 +89,8 @@ diff --git a/static/js/pad2.js b/static/js/pad2.js index 9df57ae8f..ea06d8cfd 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); document.title = document.title + " | " + padId; diff --git a/static/timeslider.html b/static/timeslider.html index 4dbf8d939..73bc5fcd1 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;