From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Another HTML Export Problem Date: Wed, 16 Mar 2011 02:31:55 +0100 Message-ID: <87lj0fu9ys.fsf@gnu.org> References: <4D8006C4.3080809@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=49482 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pzfb1-00019f-Jx for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 21:32:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pzfb0-0000L0-9M for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 21:32:19 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:46646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pzfaz-0000Ke-Uy for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 21:32:18 -0400 Received: by wyf19 with SMTP id 19so1326270wyf.0 for ; Tue, 15 Mar 2011 18:32:16 -0700 (PDT) In-Reply-To: <4D8006C4.3080809@gmail.com> (Scott Randby's message of "Tue, 15 Mar 2011 20:39:32 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Scott Randby Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Scott, Scott Randby writes: > Some links are not exporting properly with org release_7.5.52.g0dc16. It > seems that any link that contains "&" does not export correctly. Take > the four links given below. Yes, problems again here -- thanks for reporting. If you can, please test this patch. I'm not applying it right now as I want to make sure to apply a safe and complete patch. Best, --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=org-html.el.patch diff --git a/lisp/org-html.el b/lisp/org-html.el index 0abecac..c6f26b5 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -848,9 +848,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. @@ -1530,9 +1530,6 @@ 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 ">" @@ -1541,6 +1538,9 @@ lang=\"%s\" xml:lang=\"%s\"> (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)) + ;; TODO items (if (and (string-match org-todo-line-regexp line) (match-beginning 2)) @@ -1829,7 +1829,7 @@ lang=\"%s\" xml:lang=\"%s\"> "Create image tag with source and attributes." (save-match-data (if (string-match "^ltxpng/" src) - (format "@\"%s\"/" + (format "\"%s\"/" src (org-find-text-property-in-string 'org-latex-src src)) (let* ((caption (org-find-text-property-in-string 'org-caption src)) (attr (org-find-text-property-in-string 'org-attributes src)) @@ -1837,20 +1837,20 @@ lang=\"%s\" xml:lang=\"%s\"> (setq caption (and caption (org-html-do-expand caption))) (concat (if caption - (format "%s@
-@

" - (if org-par-open "@

\n" "") + (format "%s
+

" + (if org-par-open "

\n" "") (if label (format "id=\"%s\" " (org-solidify-link-text label)) ""))) - (format "@" + (format "" src (if (string-match "\\%s -@
%s" - (concat "\n@

" caption "@

") - (if org-par-open "\n@

" "")))))))) + (format "

%s +
%s" + (concat "\n

" caption "

") + (if org-par-open "\n

" "")))))))) (defun org-export-html-get-bibliography () "Find bibliography, cut it out and return it." --=-=-= Content-Type: text/plain -- Bastien --=-=-=--