From cb683e3a5693cf631e8d6625f11202f356989033 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 30 Mar 2016 17:17:07 +0200 Subject: [PATCH] ox-html: Fix planning info export * lisp/ox-html.el (org-html-planning): Properly escape angle brackets in time-stamps. Reported-by: Keith Sutton --- lisp/ox-html.el | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 59169d06d..a05fa2db6 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -3106,26 +3106,23 @@ contextual information." "Transcode a PLANNING element from Org to HTML. CONTENTS is nil. INFO is a plist used as a communication channel." - (let ((span-fmt "%s %s")) - (format - "

%s

" - (mapconcat - 'identity - (delq nil - (list - (let ((closed (org-element-property :closed planning))) - (when closed - (format span-fmt org-closed-string - (org-timestamp-translate closed)))) - (let ((deadline (org-element-property :deadline planning))) - (when deadline - (format span-fmt org-deadline-string - (org-timestamp-translate deadline)))) - (let ((scheduled (org-element-property :scheduled planning))) - (when scheduled - (format span-fmt org-scheduled-string - (org-timestamp-translate scheduled)))))) - " ")))) + (format + "

%s

" + (org-trim + (mapconcat + (lambda (pair) + (let ((timestamp (cdr pair))) + (when timestamp + (let ((string (car pair))) + (format "%s \ +%s " + string + (org-html-plain-text (org-timestamp-translate timestamp) + info)))))) + `((,org-closed-string . ,(org-element-property :closed planning)) + (,org-deadline-string . ,(org-element-property :deadline planning)) + (,org-scheduled-string . ,(org-element-property :scheduled planning))) + "")))) ;;;; Property Drawer