From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: [PATCH] Escape percent character. Date: Fri, 28 May 2010 14:11:09 +0200 Message-ID: <1275048669-2785-2-git-send-email-dmaus@ictsoc.de> References: <1275048669-2785-1-git-send-email-dmaus@ictsoc.de> Return-path: Received: from [140.186.70.92] (port=43144 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHyQB-0002iB-BD for emacs-orgmode@gnu.org; Fri, 28 May 2010 08:12:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHyQ9-0003jj-Sf for emacs-orgmode@gnu.org; Fri, 28 May 2010 08:12:15 -0400 Received: from mysql1.xlhost.de ([213.202.242.106]:55908) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHyQ9-0003jY-NU for emacs-orgmode@gnu.org; Fri, 28 May 2010 08:12:13 -0400 In-Reply-To: <1275048669-2785-1-git-send-email-dmaus@ictsoc.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * 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