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 empty links interpreted as not empty, resulted in weird behavior #610

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

reglim
Copy link
Contributor

@reglim reglim commented Sep 8, 2023

Some links like this caused problems:
<a href="" />

This was because a.href returned (page)/index.html, while I'd expected that to return an empty string. To fix this, I just switched to using a.getAttribute('href') which returns the literal value of the link as defined in the html.

Some links like this caused problems:
<a href="" />

This was because a.href returned "(page)/index.html", while I'd expected that to return "". To fix this, I just switched to using a.getAttribute('href').
@fliiiix
Copy link
Member

fliiiix commented Sep 8, 2023

❤️

@fliiiix fliiiix merged commit d449012 into main Sep 8, 2023
@fliiiix fliiiix deleted the fix/empty-links-interpreted-as-not-empty branch September 8, 2023 07:02
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.

2 participants