git ssb

3+

dust / capsule



Commit be9cbe50cdc6ee0c53a3297d045fff38383fa035

switched to correct encoding function

closes #6
dust committed on 4/17/2016, 5:27:33 AM
Parent: f7ff960296b654c83427b4d7fb4c351669c3326a

Files changed

chromium/capsule.jschanged
os/parserchanged
chromium/capsule.jsView
@@ -30,9 +30,9 @@
3030 // https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
3131 // for how terrible this can get
3232
3333 // anyway we're just going to base64 it
34- return btoa(encodeURIComponent(htmlString))
34 + return btoa(escape(htmlString))
3535 }
3636
3737 var sendHTML = function(htmlString, title, comment, channel) {
3838 chrome.tabs.getSelected(function(selectedTab) {
os/parserView
@@ -20,9 +20,13 @@
2020 }
2121 })
2222
2323 // 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))
2529 if (typeof payload.comment === 'string') {
2630 payload.body = payload.body.concat('\n<hr /><br />').concat(unescape(payload.comment))
2731 }
2832 payload.title = unescape(payload.title)

Built with git-ssb-web