From 6a369c26d3f936bc71cba9d7148dcecf1b2c9677 Mon Sep 17 00:00:00 2001 From: David Maus Date: Sun, 13 Mar 2011 20:27:12 +0100 Subject: [PATCH] Expand char entities after creating markup for links and timestamps * org-html.el (org-html-make-link, org-html-handle-links): Protect generated XHTML elements. (org-export-as-html): Expand character entities after creating markup for links and timestamps. This fixes a problem with exporting active timestamps, reported by Daniel Clemente . --- lisp/org-html.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index 35f76eb31..6651fd3b2 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -826,9 +826,9 @@ MAY-INLINE-P allows inlining it as an image." (message "image %s %s" thefile org-par-open) (org-export-html-format-image thefile org-par-open)) (concat - "" + "@" (org-export-html-format-desc desc) - ""))))) + "@"))))) (defun org-html-handle-links (line opt-plist) "Return LINE with markup of Org mode links. @@ -864,7 +864,7 @@ OPT-PLIST is the export options list." (if (string-match "^file:" desc) (setq desc (substring desc (match-end 0))))) (setq desc (org-add-props - (concat "") + (concat "@") '(org-protected t)))) (cond ((equal type "internal") @@ -990,9 +990,9 @@ OPT-PLIST is the export options list." (t ;; just publish the path, as default - (setq rpl (concat "<" type ":" + (setq rpl (concat "@<" type ":" (save-match-data (org-link-unescape path)) - ">")))) + ">@")))) (setq line (replace-match rpl t t line) start (+ start (length rpl)))) line)) @@ -1504,17 +1504,17 @@ lang=\"%s\" xml:lang=\"%s\"> "@ ") t t line))))) + ;; Format the links + (setq line (org-html-handle-links line opt-plist)) + + (setq line (org-html-handle-time-stamps line)) + ;; replace "&" by "&", "<" and ">" by "<" and ">" ;; handle @<..> HTML tags (replace "@>..<" by "<..>") ;; Also handle sub_superscripts and checkboxes (or (string-match org-table-hline-regexp line) (setq line (org-html-expand line))) - ;; Format the links - (setq line (org-html-handle-links line opt-plist)) - - (setq line (org-html-handle-time-stamps line)) - ;; TODO items (if (and (string-match org-todo-line-regexp line) (match-beginning 2)) -- 2.11.4.GIT