AEM 6.2 '+' rendered instead of '%20' | Community
Skip to main content
bmccurdy1
Level 2
March 28, 2017
Solved

AEM 6.2 '+' rendered instead of '%20'

  • March 28, 2017
  • 1 reply
  • 1158 views

I'm curious if anyone has seen this behavior where spaces are rendered as '+' in the path to assets and pages instead of '%20'. While working on a client's site I noticed several broken images and links, all had spaces in either the path and/or file name and the page rendered these as +. In other words, 'Hello World.png' became 'Hello+World.png'. While looking through code, I found a custom method that looks for the occurrence of this and replaces the '+' back to '%20'. Obviously, some links/components are not using this method. 

  When I asked about it I was told that it is a known problem that Adobe is releasing a hotfix for. I've worked on several client sites using CQ5.5 to AEM 6+ and have not experienced this specific issue, unless someone before me was handling it in a sling filter somewhere. 

 

Anyway, just curious if anyone has seen this before or if it truly is a known issue in AEM that i somehow have seemed to have never experienced over the years.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by bmccurdy1

Ok, so I found the issue. Its not an aem thing. deep in their code they are using the java URLEncode object which by default translates the spaces to '+'.  When they are encoding the url they have a check for spaces but appears it is failing on that.

1 reply

bmccurdy1
bmccurdy1AuthorAccepted solution
Level 2
March 28, 2017

Ok, so I found the issue. Its not an aem thing. deep in their code they are using the java URLEncode object which by default translates the spaces to '+'.  When they are encoding the url they have a check for spaces but appears it is failing on that.