diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 01857f7d8..675c41b81 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-11-03 Carsten Dominik + * org-exp.el (org-export-as-html): Fully process link descriptions. + (org-export-html-format-desc): New function. + * org-agenda.el (org-agenda-remove-marked-text): Bind variable BEG. diff --git a/lisp/org-exp.el b/lisp/org-exp.el index d25dc2366..453cd1fe4 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -3218,7 +3218,9 @@ lang=\"%s\" xml:lang=\"%s\"> "" desc ""))) + "\"" attr ">" + (org-export-html-format-desc desc) + ""))) ((member type '("http" "https")) ;; standard URL, just check if we need to inline an image (if (and (or (eq t org-export-html-inline-images) @@ -3229,13 +3231,16 @@ lang=\"%s\" xml:lang=\"%s\"> (setq rpl (concat "" - desc "")))) + (org-export-html-format-desc desc) + "")))) ((member type '("ftp" "mailto" "news")) ;; standard URL (setq link (concat type ":" path)) (setq rpl (concat "" desc ""))) + "\"" attr ">" + (org-export-html-format-desc desc) + ""))) ((functionp (setq fnc (nth 2 (assoc type org-link-protocols)))) ;; The link protocol has a function for format the link @@ -3281,7 +3286,8 @@ lang=\"%s\" xml:lang=\"%s\"> (not descp)))) (concat "") (concat "" - desc ""))) + (org-export-html-format-desc desc) + ""))) (if (not valid) (setq rpl desc)))) (t @@ -3557,6 +3563,13 @@ lang=\"%s\" xml:lang=\"%s\"> s (replace-match "&" t t s))))) s) +(defun org-export-html-format-desc (s) + "Make sure the S is valid as a description in a link." + (if s + (save-match-data + (org-html-do-expand s)) + s)) + (defvar org-table-colgroup-info nil) (defun org-format-table-ascii (lines) "Format a table for ascii export." @@ -3913,7 +3926,9 @@ that uses these same face definitions." (while (string-match "<" s) (setq s (replace-match "<" t t s))) (while (string-match ">" s) - (setq s (replace-match ">" t t s)))) + (setq s (replace-match ">" t t s))) + (while (string-match "\"" s) + (setq s (replace-match """ t t s)))) s) (defun org-export-cleanup-toc-line (s)