-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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(html): public asset urls always being treated as paths (fix #11857) #11870
Conversation
Unsure why the macos tests timeout, I ran the tests successfully locally on macos 🤔 |
Thanks for the PR @Codex-! The MacOS test was a flake, don't worry. |
@patak-dev really interesting test suite with I've adapted the I also validated the testing by stepping through with debugging to check we're asserting the path for a URL as expected, and explicitly so double slashes don't get broken accidentally |
4836205
to
af15cc6
Compare
af15cc6
to
899275f
Compare
0f8e930
to
bd97936
Compare
@patak-dev is there anything you want from me to get this moving? :) |
6e4808e
to
8a2b9b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the tests! Sorry for the delay.
This looks good to me, we need another review now to merge it 👍🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Description
fix #11857
Adds a simple
isUrl
utility function that simply uses the node implementation ofURL
to validate a URL before attempting to normalize the value.Additional context
Added tests, and I've tested this works against my issue repo with both a URL and non-url path, got the expected results.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).