Commit be9cbe50cdc6ee0c53a3297d045fff38383fa035
switched to correct encoding function
closes #6dust committed on 4/17/2016, 5:27:33 AM
Parent: f7ff960296b654c83427b4d7fb4c351669c3326a
Files changed
chromium/capsule.js | changed |
os/parser | changed |
chromium/capsule.js | ||
---|---|---|
@@ -30,9 +30,9 @@ | ||
30 | 30 … | // https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html |
31 | 31 … | // for how terrible this can get |
32 | 32 … | |
33 | 33 … | // anyway we're just going to base64 it |
34 | - return btoa(encodeURIComponent(htmlString)) | |
34 … | + return btoa(escape(htmlString)) | |
35 | 35 … | } |
36 | 36 … | |
37 | 37 … | var sendHTML = function(htmlString, title, comment, channel) { |
38 | 38 … | chrome.tabs.getSelected(function(selectedTab) { |
os/parser | ||
---|---|---|
@@ -20,9 +20,13 @@ | ||
20 | 20 … | } |
21 | 21 … | }) |
22 | 22 … | |
23 | 23 … | // decode payload from base64 |
24 | -payload.body = unescape(new Buffer(payload.body, 'base64').toString()) | |
24 … | +var simpleDecode = function(b64str) { | |
25 … | + return new Buffer(b64str, 'base64').toString() | |
26 … | +} | |
27 … | + | |
28 … | +payload.body = unescape(simpleDecode(payload.body)) | |
25 | 29 … | if (typeof payload.comment === 'string') { |
26 | 30 … | payload.body = payload.body.concat('\n<hr /><br />').concat(unescape(payload.comment)) |
27 | 31 … | } |
28 | 32 … | payload.title = unescape(payload.title) |
Built with git-ssb-web