From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: [BUG] OrgTbl exports raw ampersands in HTML Date: Fri, 15 Oct 2010 08:24:42 +0200 Message-ID: <5A72DA28-093A-4419-8311-DE43D575B444@gmail.com> References: <878w22oz5l.fsf@rampella.terramar.selidor.net> <21328.1286987831@gamaville.dokosmarshall.org> <87zkuinfcg.fsf@rampella.terramar.selidor.net> <8790.1286997033@alphaville.usa.hp.com> <87r5fton9s.fsf@rampella.terramar.selidor.net> <11759.1287003122@alphaville.usa.hp.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=33355 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6e5o-00013b-3B for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 02:48:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6e5m-0000Td-5F for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 02:48:39 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:53541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6e5m-0000Ql-0Y for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 02:48:38 -0400 Received: by mail-ew0-f41.google.com with SMTP id 5so249190ewy.0 for ; Thu, 14 Oct 2010 23:48:37 -0700 (PDT) In-Reply-To: <11759.1287003122@alphaville.usa.hp.com> 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org, Ivan Vilata i Balaguer On Oct 13, 2010, at 10:52 PM, Nick Dokos wrote: > Ivan Vilata i Balaguer wrote: > >> Nick Dokos (2010-10-13 21:10:33 +0200) wrote: >> >>> Yes, thanks. I'll try it out later. FWIW, my mail reader does not >>> see >>> an attachment in your message: all I get is the following attachmen >>> with an external body. Not sure whose fault that is though: maybe >>> mh-e >>> gets hopelessly confused with it. Can you post the HTML file inline? >> >> Argh, I made an external attachment, sorry. Here you have the file: >> >> ----8<---- >> >> >> >> >> >> >> >> ----8<---- >> > > The following patch should fix it: > > --8<---------------cut here---------------start------------->8--- > diff --git a/lisp/org-html.el b/lisp/org-html.el > index 3fd7b72..f7824ce 100644 > --- a/lisp/org-html.el > +++ b/lisp/org-html.el > @@ -1885,7 +1885,7 @@ lang=\"%s\" xml:lang=\"%s\"> > ;; ignore this line > (throw 'next-line t))) > ;; Break the line into fields > - (setq fields (org-split-string line "[ \t]*|[ \t]*")) > + (setq fields (mapcar (function org-html-expand) (org-split-string > line "[ \t]*|[ \t]*"))) > (unless fnum (setq fnum (make-vector (length fields) 0) > nfields (length fnum))) > (setq nline (1+ nline) i -1 > --8<---------------cut here---------------end--------------->8--- Hi Nick, this is the right medicine, in the wrong place. It needs to be done in orgtbl-to-html. The function where you inserted the call to org-html-expand is also used by the general html exporter, and during normal html export, org-html-expand is already called at an earlier stage. Anyway, thanks a lot for doing 90% of the work! - Carsten