From d3c324e4b06f0744325798b92e2dd63fa81b520e Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Thu, 10 Jul 2014 21:50:43 -0400 Subject: Adding browser key feature, better handling unicode --- firefox-addon/lib/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'firefox-addon/lib/main.js') diff --git a/firefox-addon/lib/main.js b/firefox-addon/lib/main.js index c5446f2..cc8845e 100644 --- a/firefox-addon/lib/main.js +++ b/firefox-addon/lib/main.js @@ -7,9 +7,10 @@ var XMLHttpRequest = require("sdk/net/xhr").XMLHttpRequest; function log(url, title){ var xhr = new XMLHttpRequest(); xhr.open("POST", prefs.callbackUrl); - var data = "url=" + url; + var data = "url=" + encodeURIComponent(url); data += "&time=" + Date.now(); - data += "&title=" + title; + data += "&title=" + encodeURIComponent(title); + data += "&key=" + encodeURIComponent(prefs.key); xhr.send(data); } -- cgit v1.2.3-70-g09d2