mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-27 21:39:37 +00:00
Before this fix clicking an external link in the viewer iframe had no effect (other than an error being reported in the browser dev tools console) because the attempt to navigate the top browser context was suppressed due to sandboxing. A workaround is to let the external link blocker page to be loaded in the viewer iframe and then detect that situation and handle it in the viewer JS code. This commit makes external links clickable but (temporarily) handles them by unconditionally displaying the confirmation page (as if kiwix-serve has been started with the --blockexternal option). This will be fixed shortly. A small defect is that the browsing history entry preceding the external resource access confirmation page is duplicated.