From 54888d3840b980ed7114ed27956ec417c38e50a7 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 29 Apr 2008 17:42:58 +0200 Subject: [PATCH] Make sure iCalendar export quotes comma and semicolon. There was a bug in the escaping code, and also the function doing the escaping was not called for the headline, which can also be the source of the summary. --- ChangeLog | 8 ++++++++ lisp/org-exp.el | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47f7f4f21..288c703cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-04-29 Carsten Dominik + + * lisp/org-exp.el (org-icalendar-cleanup-string): Make sure '," + and ";" are escaped. + (org-print-icalendar-entries): Also apply + `org-icalendar-cleanup-string' to the headline, not only to the + summary property. + 2008-04-28 Carsten Dominik * lisp/org-exp.el (org-export-preprocess-hook): New hook. diff --git a/lisp/org-exp.el b/lisp/org-exp.el index a52606b91..d4d0f89ad 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -3471,7 +3471,9 @@ When COMBINE is non nil, add the category to each line." (setq pos (match-beginning 0) ts (match-string 0) inc t - hd (condition-case nil (org-get-heading) + hd (condition-case nil + (org-icalendar-cleanup-string + (org-get-heading)) (error (throw :skip nil))) summary (org-icalendar-cleanup-string (org-entry-get nil "SUMMARY")) @@ -3622,7 +3624,7 @@ characters." (while (string-match re s) (setq s (replace-match "" t t s))) (while (string-match re2 s) (setq s (replace-match "" t t s))))) (let ((start 0)) - (while (string-match "\\([,;\\]\\)" s start) + (while (string-match "\\([,;]\\)" s start) (setq start (+ (match-beginning 0) 2) s (replace-match "\\\\\\1" nil nil s)))) (when is-body -- 2.11.4.GIT