Skip to content

Update page url when hash changes#1105

Merged
rbri merged 2 commits into
HtmlUnit:masterfrom
duonglaiquang:duong_location
May 25, 2026
Merged

Update page url when hash changes#1105
rbri merged 2 commits into
HtmlUnit:masterfrom
duonglaiquang:duong_location

Conversation

@duonglaiquang
Copy link
Copy Markdown
Contributor

This PR does the following

  • Fix Location.setHash() to update the page's WebRequest URL when the hash changes, ensuring page.getUrl() reflects the current hash

  • Fix WebClient.makeWebResponseForAboutUrl() to properly handle about:blank with hash fragments (e.g., about:blank#foo) instead of throwing MalformedURLException

@sonarqubecloud
Copy link
Copy Markdown

@rbri
Copy link
Copy Markdown
Member

rbri commented Mar 16, 2026

@duonglaiquang this requires some time because i have some memories that i had hard times with this. Will have a look at this during the next days...

@rbri rbri force-pushed the master branch 2 times, most recently from 2d7d378 to 96efc56 Compare April 5, 2026 17:16
@rbri
Copy link
Copy Markdown
Member

rbri commented May 25, 2026

Sorry, this got lost on my stack for version 5.0.0. But i fear i will make a 5.1.0 soon.

@rbri rbri merged commit 5f73df3 into HtmlUnit:master May 25, 2026
8 checks passed
@rbri
Copy link
Copy Markdown
Member

rbri commented May 25, 2026

merged, also duplicate your test as webdriver tests. All works fine. Thanks as always

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