Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#987 3 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
html, javascript
Lĩnh vực
analytics, frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Elixir
Star
29.7k
Fork
1.9k
Merge trung bình
3 ngày 22 giờ
Pull request đã merge (30 ngày)
50

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của plausible/analytics

Tất cả issue của plausible/analytics

Issue tương tự

Thêm issue về Elixir

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.