openzim / warc2zim

Command line tool to convert a file in the WARC format to a file in the ZIM format
https://pypi.org/project/warc2zim/
GNU General Public License v3.0
46 stars 4 forks source link

Dynamic scripts containing const and let variables are not exposed as global #398

Open benoit74 opened 2 months ago

benoit74 commented 2 months ago

This is the same issue as https://github.com/webrecorder/wombat/issues/82, which has been partially solved in https://github.com/webrecorder/wabac.js/pull/128 (and few other commits).

Note that https://github.com/webrecorder/wabac.js/issues/156 is still not addressed.

We can encounter this issue in the wild on https://geo.libretexts.org/Courses/Coastline_College/An_Introduction_To_Geology_-_Coastline_College/01%3A_Understanding_Science/1.01%3A_What_is_Science where reuse.js is exposing LibreEditor and LibreTexts.

@ikreymer: is it normal that this is not saved "already rewritten" in the WARC by wombat?

benoit74 commented 2 months ago

Nota: https://github.com/webrecorder/wabac.js/issues/156 is not encountered on libretext real use-case, importing the fix already implemented in wabac inside warc2zim would be sufficient (but I'm not sure about how to do it properly for now, I've only hacked it to check wether it was the real issue and what it would solve).