[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] [PATCH] Escape percent character.
From: |
David Maus |
Subject: |
[Orgmode] [PATCH] Escape percent character. |
Date: |
Fri, 28 May 2010 14:11:09 +0200 |
* org.el (org-fixup-message-id-for-http): Escape percent
character.
---
lisp/org.el | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 33f395b..00de5dc 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8273,6 +8273,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)
--
1.7.1