Github user martin-g commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/97#discussion_r26283695
  
    --- Diff: 
wicket-core/src/main/java/org/apache/wicket/resource/CssUrlReplacer.java ---
    @@ -71,21 +82,67 @@ else if (imageCandidateUrl.isContextAbsolute())
                                // relativize against the url for the 
containing CSS file
                                Url cssUrlCopy = new Url(cssUrl);
                                cssUrlCopy.resolveRelative(imageCandidateUrl);
    -                           PackageResourceReference imageReference = new 
PackageResourceReference(scope,
    -                                   cssUrlCopy.toString());
    -                           processedUrl = cycle.urlFor(imageReference, 
null);
    +
    +                           // if the image should be processed as URL or 
base64 embedded
    +                           if (cssUrlCopy.getQueryString() != null &&
    +                                   
cssUrlCopy.getQueryString().contains(EMBED_BASE64))
    +                           {
    +                                   embedded = true;
    +                                   PackageResourceReference imageReference 
= new PackageResourceReference(scope,
    +                                           
cssUrlCopy.toString().replace("?" + EMBED_BASE64, ""));
    +                                   try
    +                                   {
    +                                           processedUrl = 
createBase64EncodedImage(imageReference);
    +                                   }
    +                                   catch (Exception e)
    +                                   {
    +                                           throw new 
WicketRuntimeException(
    +                                                   "Error while embedding 
an image into the css: " +
    +                                                           
imageReference.toString(), e);
    --- End diff --
    
    no need of `toString()`. It is called implicitly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to