emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to export strings froom options to JS variables?


From: Sebastien Vauban
Subject: Re: [O] How to export strings froom options to JS variables?
Date: Sat, 06 Dec 2014 09:07:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt)

Marcin Borkowski wrote:
> I have this near the beginning my Org file:
>
> #+ATTR_COOL: How cool is that!
>
> I want it to be exported to something like
>
> <script>var how_cool = 'How cool is that!'
>
> There is a problem, hovever, what happens if some clever kid exploited
> it, putting things like apostrophes into the string:
>
> #+ATTR_COOL: It's nice!
>
> which gets exported to
>
> <script>var how_cool = 'It's nice!</script>
>
> and hilarity ensues.
>
> So, my question is: how to solve this problem?

Though I did not try, I think that a macro should make it.

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]