guru-bharadwaj20 opened a new pull request, #1967: URL: https://github.com/apache/wicket/pull/1967
Fixes #1950 For a relative URL, `renderFullUrl` copies the base URL, resolves the relative URL onto the copy with `resolveRelative()` and renders the copy. `resolveRelative()` replaces the segments and query parameters but leaves the fragment alone, so the rendered URL got the base URL's fragment instead of its own: `../four#section` against `one/two/three` came out as `.../one/four`, and against `one/two/three#top` as `.../one/four#top`. The fix sets the fragment of the URL being rendered on the copy before it is rendered. Full and context-absolute URLs already kept their fragment, because they are rendered through `url.canonical()`, which copies it. There was a test for the full case (`renderFullUrlWithFragment`); I added one for a context-absolute URL and two for relative URLs, one of them with a fragment on the base URL. The two relative ones fail without the change. Tested with JDK 21: installed `wicket-request` (its own tests pass), then ran all of `wicket-core-tests` against it: 2598 tests, no failures. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
