adobe / aem-core-email-components

Apache License 2.0
13 stars 11 forks source link

Text Component - Link Plugin does not allow Personalization Tokens to be inserted as link #132

Open priyankpardiwala opened 2 years ago

priyankpardiwala commented 2 years ago

I was trying to add a personalization token (Ex: <%=targetData.link%>) into the link plugin on the Text Component. The linkchecker is removing the link.

Expected Behavior: Authors are able to add personalization token to a link in RTE Link Plugin for Email components.

stein-rockware commented 2 years ago

We have to create a configuration for the link checker to fix this issue. But as the link checker does not have a config factory and a lot of customers probably have their own config for the link checker, we should handle this as follows:

priyankpardiwala commented 2 years ago

I was testing this feature and now I am able to add a personalization token as "href" in the Link RTE plugin for Text component.

One issue that I am seeing is that, when I reopen/re-edit the component, it loses the link. Please see the screenshots below.

image image image

priyankpardiwala commented 2 years ago

Hi @edoardo-goracci - the issue is almost fixed in the package 0.13.0 but one minor issue still exists.

Step 1: Add Text component. Author text with Hyperlink RTE plugin. Step 2: Use <% targetData.link %> as the hyperlink. Step 3: Click "Ok". The link gets added to the mark up as expected. Step 4: Re-edit the text component. The hyperlink is retained but it replaces the "<" symbol with "%3C% . Please see the image below.

image

buuhuu commented 2 years ago

I saw the same and documented it in the pull request here https://github.com/adobe/aem-core-email-components/issues/189#issuecomment-1191422094

This is an issue of the RTE and independent from the email components. I created a jira for that and we have to plan it. Earliest would be the next service pack for on-prem/AMS.

Tracked in SITES-7137