emacs-orgmode
[Top][All Lists]
Advanced

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

Re: http links translated to html : target "_blank"


From: Juan Manuel Macías
Subject: Re: http links translated to html : target "_blank"
Date: Mon, 01 Feb 2021 12:03:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

I think the problem is how the exporter understands the url string.

Note that this:

@@html:<a href="https://www.mpic.de/4747361/risk-calculator"; 
target="_blank">Simulador de riesgo con más detalle</a>@@

[[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
riesgo con más detalle]]

is exported like this:

<p>
<a href="https://www.mpic.de/4747361/risk-calculator"; target="_blank">Simulador 
de riesgo con más detalle</a>
</p>

<p>
<a 
href="https://www.mpic.de/4747361/risk-calculator%20target=%22_blank%22";>Simulador
 de riesgo con más detalle</a>
</p>

The second link is wrong formatted. A dirty solution could be:

#+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

Best regards,

Juan Manuel

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

> Hi
>
> I need to produce a html file, with links opening new tabs (pages) as in
>
> <a href="https://apps.apple.com/es/app/radar-covid/id1520443509"; 
> target="_blank">Descarga Directa</a>
>
> However
>
>  [[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
> riesgo con más detalle]]
>
> Did not work
>
> Any ideas?
>
> Thanks and regards
>
> Uwe Brauer
>
>



reply via email to

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