mwoffliner icon indicating copy to clipboard operation
mwoffliner copied to clipboard

Correctly rewrite / block iframes to external content

Open benoit74 opened this issue 5 months ago • 5 comments

It looks like iframes are not rewritten at all currently in mwoffliner. We should.

See https://github.com/openzim/zim-requests/issues/1471#issuecomment-3043489876

Image

This iframe comes from the Wikitext itself:

Image Image Image

benoit74 avatar Jul 07 '25 08:07 benoit74

@kelson42 shall we consider for the time being that simply removing all iframes is fine? I feel like having a logic to detect if target of iframe is going to work or not inside the ZIM is not going to be worth it. From my understanding, iframe are rare in Mediawiki, and I'm quite sure most of them are not going to work inside the ZIM.

benoit74 avatar Sep 15 '25 15:09 benoit74

Just removing all iframes seems like the best solution to me as well.

Markus-Rost avatar Sep 15 '25 15:09 Markus-Rost

Handling properly iframe is goingto be challenging IMHO. Therefore I agree to (1) Remove them for the time being as workaround (2) keep this issue open to try to handle that properly in the future (postponing)

kelson42 avatar Oct 02 '25 10:10 kelson42

Postponing this issue to 2.0.0 then ; removal of iframe as a temporary workaround is now tracked in https://github.com/openzim/mwoffliner/issues/2537

benoit74 avatar Oct 02 '25 10:10 benoit74

See also #2481

kelson42 avatar Oct 03 '25 08:10 kelson42