diff --git a/.gitignore b/.gitignore
index ab91434b..50cd6e21 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,6 @@ bin/abiword.exe
bin/node.exe
etherpad-lite-win.zip
var/dirty.db
-bin/convertSettings.json
\ No newline at end of file
+bin/convertSettings.json
+*~
+*.patch
\ No newline at end of file
diff --git a/static/js/ace2_common.js b/static/js/ace2_common.js
index 18478586..de2fede1 100644
--- a/static/js/ace2_common.js
+++ b/static/js/ace2_common.js
@@ -76,10 +76,13 @@ function isArray(testObject)
if (typeof exports !== "undefined")
{
- var navigator = {userAgent: "node-js"};
+ userAgent = "node-js";
+}
+else
+{
+ userAgent = navigator.userAgent.toLowerCase();
}
// Figure out what browser is being used (stolen from jquery 1.2.1)
-userAgent = navigator.userAgent.toLowerCase();
var browser = {
version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
safari: /webkit/.test(userAgent),
diff --git a/static/js/pad2.js b/static/js/pad2.js
index d194b660..6f398bad 100644
--- a/static/js/pad2.js
+++ b/static/js/pad2.js
@@ -174,7 +174,7 @@ function handshake()
function sendClientReady(isReconnect)
{
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
if(!isReconnect)
document.title = document.title + " | " + padId;
diff --git a/static/timeslider.html b/static/timeslider.html
index 4dbf8d93..11c5ef7f 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;
@@ -271,7 +271,11 @@
Return to pad