Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add <base> to fix relative error in iframe #2961

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FrankCheungDev
Copy link

@FrankCheungDev FrankCheungDev commented Sep 25, 2022

Summary

This PR fixes the following bug:

  • Bug: the wrong path in iframe when using relative path

Fixes #1461

Thanks.

@amid0
Copy link

amid0 commented Apr 26, 2023

Can it be merged, please?

@Sharcoux
Copy link

Can be tested in @cantoo/html2canvas

nangelina added a commit to artificialonlinesao/html2canvas that referenced this pull request Feb 9, 2024
Squashed commit of the following:

commit 41fb73e
Author: Frank Cheung <frank.cheung.work@outlook.com>
Date:   Sun Sep 25 13:13:31 2022 +0800

    fix: add <base> to fix relative error in iframe
nangelina added a commit to artificialonlinesao/html2canvas that referenced this pull request Feb 11, 2024
calling adoptNode before document.open() caused the snapshot to get cropped, so adapt the pr to only get the baseURI first, then call adoptNode and add the <base> element to it afterwards

Squashed commit of the following:

commit 41fb73e
Author: Frank Cheung <frank.cheung.work@outlook.com>
Date: Sun Sep 25 13:13:31 2022 +0800

fix: add <base> to fix relative error in iframe
@Sharcoux
Copy link

This broke the feature on our side. We will revert this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relative path in iframe
3 participants