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

   Inside `<wicket:link>` (and for relative paths in general), Wicket rewrites 
the URLs in `href`, `src` and `background` attributes so they resolve relative 
to the page's package. The `srcset` attribute of `<img>` and `<source>` is not 
rewritten, so responsive images in static markup break.
   
   ## Where
   
   
`wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/RelativePathPrefixHandler.java`,
 the `attributeNames` array and the code that uses it. Check also how 
`<wicket:link>` resolves `src` (the auto-link resolver) to see whether `srcset` 
needs handling there too.
   
   `srcset` is not a single URL but a comma-separated list of `url descriptor` 
pairs, for example `small.jpg 480w, large.jpg 1080w`. Each URL needs rewriting 
and the descriptors must be kept.
   
   ## Done when
   
   - Relative URLs in `srcset` on `<img>` and `<source>` are rewritten the same 
way as `src`, with the descriptors kept.
   - Tests next to the existing ones in 
`wicket-core-tests/src/test/java/org/apache/wicket/markup/parser/RelativePathPrefixHandlerTest.java`.
   
   ## Background
   
   Originally reported as 
[WICKET-6326](https://issues.apache.org/jira/browse/WICKET-6326) (Wicket 8.0).
   
   ---
   
   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