aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2016-07-10 10:18:56 +0200
committerRahiel Kasim <rahielkasim@gmail.com>2016-07-10 10:18:56 +0200
commit862a87e8d2a6fb49ad1ada13a3dbf8f74d901ae9 (patch)
treee59d8967903692c0eb247865d448eeb3a5571ea8
parentb62f5bcc9dd3aaf00d18c635ae4839294d5a9b08 (diff)
URI encode GET parameters for archiving URLs (fixes #11)
-rw-r--r--chromium/manifest.json2
-rw-r--r--firefox/package.json2
-rw-r--r--package.json4
-rw-r--r--utils.js5
4 files changed, 7 insertions, 6 deletions
diff --git a/chromium/manifest.json b/chromium/manifest.json
index 3e1d856..657780e 100644
--- a/chromium/manifest.json
+++ b/chromium/manifest.json
@@ -2,7 +2,7 @@
"name": "Archiveror",
"author": "Rahiel Kasim",
"description": "Archive webpages on archive.is, archive.org and more or on your own computer in MHTML format. Automatically archive your bookmarks.",
- "version": "0.5.2",
+ "version": "0.5.3",
"icons": {
"16": "icon-16.png",
diff --git a/firefox/package.json b/firefox/package.json
index 1416102..ecfaa9e 100644
--- a/firefox/package.json
+++ b/firefox/package.json
@@ -8,7 +8,7 @@
"homepage": "https://github.com/rahiel/archiveror",
"author": "Rahiel Kasim",
"license": "GPL-3.0+ (https://github.com/rahiel/archiveror/blob/master/LICENSE.txt)",
- "version": "0.5.2",
+ "version": "0.5.3",
"preferences": [
{
"name": "archiveService",
diff --git a/package.json b/package.json
index 1bddb99..342c201 100644
--- a/package.json
+++ b/package.json
@@ -23,9 +23,9 @@
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2015-native-modules": "^6.6.0",
- "eslint": "^2.13.1",
+ "eslint": "^3.0.1",
"jpm": "^1.0.7",
- "webpack": "^2.1.0-beta.14"
+ "webpack": "^2.1.0-beta.15"
},
"babel": {
"presets": [
diff --git a/utils.js b/utils.js
index 66cf9d4..17289bc 100644
--- a/utils.js
+++ b/utils.js
@@ -13,12 +13,13 @@ export function is_local(url) {
}
export function get_archiving_url(page, service, email) {
- let url = "https://archive.is/?run=1&url=" + page; // default
+ let url = "https://archive.is/?run=1&url=" + encodeURIComponent(page); // default
if (service === "archive.org")
+ // breaks if page is URI encoded
url = "https://web.archive.org/save/" + page;
else if (service === "webcitation.org") {
let base = "http://www.webcitation.org/archive?url=";
- url = base + encodeURIComponent(page) + "&email=" + email;
+ url = base + encodeURIComponent(page) + "&email=" + encodeURIComponent(email);
}
return url;
}