Support srcdoc HTML element
From the wget mailing list (3.9.2022):
I tried searching the mailing list, bug tracker and source code for srcdoc support, seems it is missing. If I missed something, please don’t hesitate to point it here.
I’m using GNU Wget 1.21.3, trying to archive some websites for posterity. The only missing feature for my case is this one.
Example, suppose the html file at https://example.com/subfolder/about.html contains:
<!DOCTYPE html>
<iframe srcdoc="
<img src=relative.jpg>
<img src="/absolute.jpg">
"></iframe>
The expected is that it selects for download the following: https://example.com/subfolder/relative.jpg https://example.com/absolute.jpg
documentation: https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-srcdoc
Browser support: https://caniuse.com/?search=srcdoc
edge-case (or absence-of): Seems that due some past oversight the iframe inherits the parents base url: https://github.com/whatwg/html/issues/8105 Due to backwards compatibility this is not expected to change much