libkiwix icon indicating copy to clipboard operation
libkiwix copied to clipboard

Kiwix-serve: external link blocker does not respect the `target` attribute

Open benoit74 opened this issue 1 year ago • 2 comments

See e.g. https://dev.library.kiwix.org/viewer#libretexts.org_en_workforce_2024-12/index.html (or any other libretexts ZIM in dev library ... or prod soon hopefully).

When you click on the blue globe in the top right corner, the target is _blank but the external link blocker opens in same tab.

Image

Image

benoit74 avatar Dec 09 '24 09:12 benoit74

Thanks to @veloman-yunkan

✅ This issue has been resolved by PR #1176.

The problem was that the external link blocker was not respecting the _blank target, causing external links (like the blue globe icon in the top right) to open in the same tab instead of a new one.

Fix Details:

  • The fix ensures that links explicitly set to open in _blank are properly handled.
  • Now, clicking external links opens them in a new tab as expected.

Optimus-NP avatar Mar 02 '25 21:03 Optimus-NP

@Optimus-NP Thx, we will check and close

kelson42 avatar Mar 03 '25 04:03 kelson42