Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Quoting HTML tags" does not work #7

Open
pinard opened this issue Mar 21, 2014 · 0 comments
Open

"Quoting HTML tags" does not work #7

pinard opened this issue Mar 21, 2014 · 0 comments

Comments

@pinard
Copy link
Contributor

pinard commented Mar 21, 2014

Hi, Masafumi ! I hope you are doing well, and that life is good for you !

I'm trying to enrich org-js usage by combining it with other JavaScript frameworks. It seems that #+ATTR_HTML is usable to push new attributes into the generated HTML, I'll try to see how much control I may have on this. For inserting raw HTML, which is a safe last resort, my little tries have not been successful so far. So this new Issue on GitHub !

The current Org manual contains:

12.6.4 Quoting HTML tags
------------------------

Plain ‘<’ and ‘>’ are always transformed to ‘&lt;’ and ‘&gt;’ in HTML
export.  If you want to include raw HTML code, which should only appear
in HTML export, mark it with ‘@@html:’ as in ‘@@html:<b>@@bold
text@@html:</b>@@’.  For more extensive HTML that should be copied
verbatim to the exported file use either

     #+HTML: Literal HTML code for export

or

     #+BEGIN_HTML
     All lines between these markers are exported literally
     #+END_HTML

It seems that org-js does not support any of these three methods. Given this input:

#+TITLE: OK

Normal paragraph.

Paragraph with @@html:<b>@@Inlined tags@@html:</b>@@ embedeed.

#+HTML: <b>Single-line</b> HTML excerpt.

#+BEGIN_HTML
<quote>
Multi-line HTML excerpt.
</quote>
#+END_HTML

org-js produces this output:

<h1>OK</h1>
<ul></ul>

<p>Normal paragraph.</p>
<p>Paragraph with @@html:&#60;b&#62;@@Inlined tags@@html:&#60;/b&#62;@@ embedeed.</p>
<p>&#60;quote&#62;
Multi-line HTML excerpt.
&#60;/quote&#62;</p>

As you may see, special HTML characters are always escaped. Moreover, the Single-line HTML excerpt wholly disappears.

François

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant