dashorst opened a new issue, #1950:
URL: https://github.com/apache/wicket/issues/1950

   `UrlRenderer#renderRelativeUrl` keeps a URL's fragment (the part after `#`), 
but `UrlRenderer#renderFullUrl` drops it. A link rendered as a full URL, for 
example `https://example.com/app/page#section`, loses its `#section`. Both 
methods should produce the same URL, the full one just written as an absolute 
URL.
   
   ## Where
   
   `wicket-request/src/main/java/org/apache/wicket/request/UrlRenderer.java`, 
method `renderFullUrl(Url)`. It builds the result from protocol, host, port, 
context path and path, and never looks at `url.getFragment()`. Compare with the 
end of `renderRelativeUrl`, which calls 
`relativeUrl.setFragment(url.getFragment())`.
   
   ## Done when
   
   - `renderFullUrl` keeps the fragment, for full, context-absolute and 
relative input URLs.
   - Tests in 
`wicket-core-tests/src/test/java/org/apache/wicket/core/request/cycle/UrlRendererTest.java`.
 The tests live in a different module than the code: install `wicket-request` 
before running them, or the test runs against the last jar you installed.
   
   ## Background
   
   Originally reported as 
[WICKET-7165](https://issues.apache.org/jira/browse/WICKET-7165) (Wicket 10.6).
   
   ---
   
   Part of #1945. This issue is meant for a first contribution to Wicket. To 
work on it, leave a comment so others know; a claim without a pull request 
lapses after two weeks. Questions are welcome, here on the issue or on 
[email protected]. Start your branch from `master`, and see [Send a pull 
request to 
Wicket](https://wicket.apache.org/contribute/wicket-pull-request.html) for 
building and testing.
   


-- 
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]

Reply via email to