Hi Uwe,

Uwe Brauer <o...@mat.ucm.es> writes:

> Thanks that works, but not for link in a list. The only solution 
> seems to be this one

Doesn't it work for you in a list? I think it should work also in a
list. If I export this:

#+begin_src org
  ,#+BIND: org-export-filter-final-output-functions (correct-target-blank)
  ,#+begin_src emacs-lisp :exports results :results none
    (defun correct-target-blank (text backend info)
     (when (org-export-derived-backend-p backend 'html)
        (replace-regexp-in-string "%20target=%22_blank%22\""  "\" 
target=\"_blank\"" text)))
  ,#+end_src

+ 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&dchild=1&keywords=Rocketbook&qid=1607847519&sr=8-5&th=1
 target="_blank"][Book A4]]

+ 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&dchild=1&keywords=Rocketbook&qid=1607847519&sr=8-5&th=1
 target="_blank"][Book A4]]
#+end_src

I get this:

#+begin_src html
<ul class="org-ul">
<li><a 
href="https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&amp;dchild=1&amp;keywords=Rocketbook&amp;qid=1607847519&amp;sr=8-5&amp;th=1";
 target="_blank">Book A4</a></li>

<li><a 
href="https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&amp;dchild=1&amp;keywords=Rocketbook&amp;qid=1607847519&amp;sr=8-5&amp;th=1";
 target="_blank">Book A4</a></li>
</ul>
#+end_src

Using `#+attr_html:' is a simpler and cleaner solution, of course, but I think 
that
would not work with links within a paragraph.

Best regards / saludos,

Juan Manuel 

Reply via email to