Bladeren bron

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.
Carsten Dominik 17 jaren geleden
bovenliggende
commit
54888d3840
2 gewijzigde bestanden met toevoegingen van 12 en 2 verwijderingen
  1. 8 0
      ChangeLog
  2. 4 2
      lisp/org-exp.el

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+2008-04-29  Carsten Dominik  <dominik@science.uva.nl>
+
+	* 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  <dominik@science.uva.nl>
 
 	* lisp/org-exp.el (org-export-preprocess-hook): New hook.

+ 4 - 2
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