From: Carsten Dominik <carsten.dominik@gmail.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org, Ivan Vilata i Balaguer <ivan@selidor.net>
Subject: Re: Re: [BUG] OrgTbl exports raw ampersands in HTML
Date: Fri, 15 Oct 2010 08:24:42 +0200 [thread overview]
Message-ID: <5A72DA28-093A-4419-8311-DE43D575B444@gmail.com> (raw)
In-Reply-To: <11759.1287003122@alphaville.usa.hp.com>
On Oct 13, 2010, at 10:52 PM, Nick Dokos wrote:
> Ivan Vilata i Balaguer <ivan@selidor.net> 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<----
>> <html>
>> <body>
>> <!-- [CDATA[
>> #+ORGTBL: SEND test orgtbl-to-html
>> | foo&bar |
>> ]] -->
>> <!-- BEGIN RECEIVE ORGTBL test -->
>> <!-- END RECEIVE ORGTBL test -->
>> </body>
>> </html>
>> ----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
next prev parent reply other threads:[~2010-10-15 6:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-13 16:06 [BUG] OrgTbl exports raw ampersands in HTML Ivan Vilata i Balaguer
2010-10-13 16:37 ` Nick Dokos
2010-10-13 17:59 ` Ivan Vilata i Balaguer
2010-10-13 19:10 ` Nick Dokos
2010-10-13 20:23 ` Ivan Vilata i Balaguer
2010-10-13 20:52 ` Nick Dokos
2010-10-15 6:24 ` Carsten Dominik [this message]
2010-10-15 12:22 ` Nick Dokos
2010-10-15 12:31 ` Ivan Vilata i Balaguer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5A72DA28-093A-4419-8311-DE43D575B444@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=ivan@selidor.net \
--cc=nicholas.dokos@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).