Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-5444

target="_blank" gets added to links that aren't external

XMLWordPrintable

    • 3
    • Accessibility

      Every link in content that has href="javascript:void(0)", which is a common way to prevent default link behavior. Example here: https://develop.greenpeace.ch/de/external-link/

      A link that isn't to an external page is treated as external link. Functionality is broken (it opens in a new tab) and formatting is wrong (external link icon is added to it).

      Links that don't conform to a certain pattern are changed to be formatted as external links (by adding an svg icon and a class name) and target="_blank" gets added the them. The function that does this is greedy and doesn't exclude this case. In this case, the link should not be treated as an external link.

      Reported at Github

            contributor Community Contributor
            stduerre Stefan Duerrenberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: