Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

The outbound links version of the tracking code breaks links which 'break out' of an iframe.

Abierto
#987 3 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
html, javascript

Línea de trabajo

Start with the outbound-links.js script and reproduce the supplied HTML example in an iframe using an anchor with target="_top". Trace the click handling and verify that the link opens the Books Etc. site outside the surrounding iframe, as described under Expected behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Bug report

The outbound link version of the tracking breaks the ability of links inside iframes to 'break out' of the iframe when you include target="_top" as one of the <a> tags attributes.

So for example if a HTML page with the following code was included as an iframe in another page, the "link to Books Etc." link would fail to 'break out' of the iframe and the Books Etc. site would be displayed framed within the surrounding page.

<html>
  <head>
    <title>An example of a link in an iframe</title>
    <script async defer data-domain="example.test" src="https://plausible.io/js/plausible.outbound-links.js"></script>
  </head>
  <body>
    <h2>Inside an iframe</h2>
    <p>
      This <a href="https://www.booksetc.co.uk/" target="_top">link to Books Etc.</a> as <code>target="_top"</code> and so clicking on it should break out of the surrounding page.
    </p>
  </body>
</html>

Expected behavior

The expected behaviour is that clicking on the Books Etc. link above would break out of the iframe and open the Books Etc. website without it being framed.

Environment
This problem affects multiple browsers e.g. latest versions of Firefox and Chrome.

Lenguaje dominante
Elixir
Estrellas
29.7k
Forks
1.9k
Merge medio
3 d 22 h
PR fusionados (30 d)
50

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de plausible/analytics

Todos los issues de plausible/analytics

Issues similares

Más issues de Elixir

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.