aem-core-wcm-components icon indicating copy to clipboard operation
aem-core-wcm-components copied to clipboard

[Regression] New LinkBuilderImpl fails for links that contain Adobe Campaign expressions

Open buuhuu opened this issue 2 years ago • 4 comments

Bug Report

Current Behavior Links that contain Adobe Campaign expressions like /path/to/page.html?recipient=<%= recpient.id %> worked well in the past (incl. rel. 2.20.8). With #2196 the behaviour changed as the LinkBuilderImpl now calls URLDecoder.decode() on the given url/path which fails with an exception

java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - Error at index 0 in: "= "
        at java.base/java.net.URLDecoder.decode(URLDecoder.java:232)
        at java.base/java.net.URLDecoder.decode(URLDecoder.java:142)
        at com.adobe.cq.wcm.core.components.internal.link.LinkBuilderImpl.buildLink(LinkBuilderImpl.java:159)

Expected behavior/code Links with Adobe Campaign expressions should be supported.

Environment

  • AEM: CS quickstart (master)
  • Core Components version: master
  • JRE version: 11

Possible Solution I see two possible solutions:

a) restore the previous behaviour (remove the url decoding again) b) let the PathProcessor do the decoding so that a email specific path processor could handle the Adobe Campaign expressions gracefully (the default implementation could be the URLDecoder.decode())

Additional context / Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.

buuhuu avatar Aug 10 '22 08:08 buuhuu

:x: You don't have permission to export this issue.

github-jira-sync-bot avatar Aug 10 '22 08:08 github-jira-sync-bot

:x: You don't have permission to export this issue.

github-jira-sync-bot avatar Aug 11 '22 15:08 github-jira-sync-bot

@adobe export issue to Jira project SITES as Bug

bpauli avatar Aug 12 '22 06:08 bpauli

:white_check_mark: Jira issue SITES-7428 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Aug 12 '22 06:08 github-jira-sync-bot