--- simplenote.el 2010-05-14 18:32:02.000000000 +0100 +++ simplenote.el 2010-05-14 18:33:46.000000000 +0100 @@ -53,6 +53,9 @@ (defvar simplenote-email-was-read-interactively nil) (defvar simplenote-password-was-read-interactively nil) +(defun simplenote-encode-post-data (string) + (concat (base64-encode-string string) "\n")) + (defun simplenote-email () (when (not simplenote-email) (setq simplenote-email (read-string "Simplenote email: ")) @@ -72,9 +75,9 @@ (setq url-request-extra-headers '(("Content-Type" . "application/x-www-form-urlencoded"))) (setq url-request-data - (base64-encode-string (format "email=%s&password=%s" - (url-hexify-string email) - (url-hexify-string password)))) + (simplenote-encode-post-data (format "email=%s&password=%s" + (url-hexify-string email) + (url-hexify-string password)))) (with-current-buffer (url-retrieve-synchronously url) (setq status url-http-response-status) (when (eql status 200) @@ -164,7 +167,7 @@ (url-hexify-string token) (url-hexify-string email)))) (setq url-request-method "POST") - (setq url-request-data (base64-encode-string text)) + (setq url-request-data (simplenote-encode-post-data text)) (with-current-buffer (url-retrieve-synchronously url) (setq status url-http-response-status) (when (eql status 200) @@ -186,7 +189,7 @@ (url-hexify-string token) (url-hexify-string email)))) (setq url-request-method "POST") - (setq url-request-data (base64-encode-string text)) + (setq url-request-data (simplenote-encode-post-data text)) (with-current-buffer (url-retrieve-synchronously url) (setq status url-http-response-status) (when (eql status 200)