Hi @user96222,
In the newer AEM SDKs, especially starting from certain recent versions, there have been tightened restrictions or changes in how colon characters are handled, particularly in HTML attributes, data attributes, and tracking metadata. This is partly due to evolving standards and improvements in content security and HTML compliance.
Why colons (:
) are causing issues now
-
Colons are not valid characters in some HTML5 attribute names, especially in custom data-*
attributes or JSX-style attributes that may be parsed differently.
-
Older SDKs may have been more permissive or lenient, but the new SDKs sanitize or block those characters, leading to them being ignored or stripped when rendering or serializing DOM attributes.
-
If the underlying component (like in your case /libs/commerce/gui/components/authoring/editor/pagepreview/pagepreview.jsp
) tries to inject this attribute using a map or via element.setAttribute
, and it hits a disallowed character like :
, it silently fails or skips it.
What you can do
1. Use a safer naming convention:
If you're using the trackingFeature
value just for analytics or DOM tracking, go with:
aemcifpagepreview
aem-cifpage-preview
aem_cifpage_preview
Any of those formats will be much safer and are future-proof across SDK versions and browsers.
2. Patch the JSP or adjust consumer logic:
If you have control over the /libs/commerce/gui/components/authoring/editor/pagepreview/pagepreview.jsp
logic (via overlaying to /apps
), you can sanitize or allow colons if absolutely necessary — though it's not recommended.
But in general, you're better off adapting your trackingFeature value to be colon-free.
Hope that helps!
Regards,
Santosh