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: Use correct base URL in getElementByUrl #2148

Merged
merged 1 commit into from Apr 2, 2019

Conversation

Projects
None yet
3 participants
@antross
Copy link
Member

commented Apr 1, 2019

Pull request checklist

Make sure you:

For non-trivial changes, please make sure you also:

  • Added/Updated related documentation.
  • Added/Updated related tests.

Short description of the change(s)

Use the base URL of the document to resolve relative URLs for finding elements, not the URL that was requested.

Fix unhandled errors cause by trying to resolve relative URLs against data-uris.
Also fix not found elements due to relative URLs being resolved against the wrong path.

@antross antross requested review from molant and sarvaje as code owners Apr 1, 2019

@molant
Copy link
Member

left a comment

Should we have a test for this? Seems pretty important to messes it again and we have the node api refactor coming soon 🤔

@antross

This comment has been minimized.

Copy link
Member Author

commented Apr 1, 2019

Should we have a test for this?

Probably a good idea. I'll add one.

@antross antross referenced this pull request Apr 1, 2019

Merged

Chore: Migrate browser extension to React #2140

3 of 3 tasks complete

@antross antross force-pushed the antross:fix/element-base-url branch from 7b9aabc to e2194a0 Apr 1, 2019

@sarvaje

sarvaje approved these changes Apr 2, 2019

@molant

molant approved these changes Apr 2, 2019

@molant molant merged commit bff5155 into webhintio:master Apr 2, 2019

3 of 5 checks passed

webhintio.hint Build #20190401.19 failed
Details
webhintio.hint (macOS_PR node_11_x) macOS_PR node_11_x was canceled
Details
licence/cla Contributor License Agreement is signed.
Details
webhintio.hint (Linux_PR node_11_x) Linux_PR node_11_x succeeded
Details
webhintio.hint (Windows_PR node_11_x) Windows_PR node_11_x succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.