From 963f830b2e4a1e37fce8947acd381a81a429ba2c Mon Sep 17 00:00:00 2001 From: David Maus Date: Fri, 28 May 2010 17:11:09 +0000 Subject: [PATCH] Escape percent character. * org.el (org-fixup-message-id-for-http): Escape percent character. --- lisp/org.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 97650d47e..596032312 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8275,6 +8275,12 @@ This is the list that is used before handing over to the browser.") (defun org-fixup-message-id-for-http (s) "Replace special characters in a message id, so it can be used in an http query." + (when (string-match "%" s) + (setq s (mapconcat (lambda (c) + (if (eq c ?%) + "%25" + (char-to-string c))) + s ""))) (while (string-match "<" s) (setq s (replace-match "%3C" t t s))) (while (string-match ">" s)