One function
render_preview_html in ArchiveBox/abx-plugins
The author described this change as “fix archivewebpage one-domain replay base”. It counts as a record because the check below fails on the code as it stood at c9106f441 and passes on e7409f33a, with nothing else changed between the two runs.
ProjectArchiveBox/abx-plugins
Fix saved2026-06-04
Sharing licenceMIT · LICENSE
Change size+2 −0
What the code was meant to do, written into the code itself as a docstring
Render the plugin's `full.html` template as the WACZ preview body. If a WACZ path is provided, the first archived URL from its pages index is used so replayweb.page can land directly in replay mode. Falls back to `fallback_url` (typically `Snapshot.url`) if the WACZ has no readable pages index.
The change
| 17 | 17 | if not archived_url: | |
| 18 | 18 | archived_url = fallback_url or "" | |
| 19 | 19 | ||
| 20 | + | replay_base = _replay_base_for_output_path(output_path) | |
| 20 | 21 | archived_url_attr = ( | |
| 21 | 22 | f'url="{html_escape(archived_url, quote=True)}"' if archived_url else "" | |
| 22 | 23 | ) | |
| ⋯ | |||
| 30 | 31 | .replace("{{ output_path_raw }}", html_escape(filename, quote=True)) | |
| 31 | 32 | .replace("{{ output_path }}", html_escape(output_path, quote=True)) | |
| 32 | 33 | .replace("{{ archived_url }}", html_escape(archived_url, quote=True)) | |
| 34 | + | .replace("{{ replay_base }}", html_escape(replay_base, quote=True)) | |
| 33 | 35 | ) | |
The check that tells the two apart
fail→pass·tests/test_archivewebpage_replay_preview.py::test_replay_preview_bootstrap_always_appends_ui_after_service_worker_wait
Check file tests/test_archivewebpage_replay_preview.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itc9106f4410500ffad8f0d61738db9d1aeb0325ff
Broken version dated2026-06-04
Moduleabx_plugins.plugins.archivewebpage.replay_preview
Units changedrender_preview_html
Fingerprinted807d3de3288cc3
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.