Issue with Special Characters (|) in URLs within Open HTML Component | Community
Skip to main content
August 22, 2025
Solved

Issue with Special Characters (|) in URLs within Open HTML Component

  • August 22, 2025
  • 1 reply
  • 944 views

I am using the Open HTML component in AEM to add custom HTML .When I use <a> that includes URLs with special characters such as | in the query string (for example:
https://www.example.com/search?query=location:ABC,DEF|date:2025-10-01~2025-10-31).

However, I’ve noticed that these characters are either being blocked, removed, or not rendered correctly when I save or publish the content. I would prefer not to use URL encoding (e.g., %7C for |) 

Best answer by giuseppebaglio

hi @vanitana1

you can try Disabling link checking in the anchor: you can add the attribute x-cq-linkchecker="skip" to the <a> tag to prevent AEM’s Link Checker from inspecting or altering the URL.

How to apply:

<a href="https://www.example.com/search?query=location:ABC,DEF|date:2025-10-01~2025-10-31" x-cq-linkchecker="skip">Search Results</a>

 This instructs the AEM Link Checker to skip validation and rewriting of this link, preserving the special characters as-is without blocking or removing them.

 

Here are some drawbacks of using this solution, though:

  • No validation of skipped links:
    The Link Checker will completely ignore the link, so any actual broken or invalid links won’t be detected or flagged, which might lead to undetected broken links on your site.

  • Potential SEO impact:
    Broken links that are skipped will not be identified or fixed, potentially harming user experience and SEO if such links become invalid over time.

  • Manual monitoring required:
    Since automatic link checking is bypassed, it requires more manual oversight to ensure all skipped links remain valid.

1 reply

giuseppebaglio
giuseppebaglioAccepted solution
Level 10
August 22, 2025

hi @vanitana1

you can try Disabling link checking in the anchor: you can add the attribute x-cq-linkchecker="skip" to the <a> tag to prevent AEM’s Link Checker from inspecting or altering the URL.

How to apply:

<a href="https://www.example.com/search?query=location:ABC,DEF|date:2025-10-01~2025-10-31" x-cq-linkchecker="skip">Search Results</a>

 This instructs the AEM Link Checker to skip validation and rewriting of this link, preserving the special characters as-is without blocking or removing them.

 

Here are some drawbacks of using this solution, though:

  • No validation of skipped links:
    The Link Checker will completely ignore the link, so any actual broken or invalid links won’t be detected or flagged, which might lead to undetected broken links on your site.

  • Potential SEO impact:
    Broken links that are skipped will not be identified or fixed, potentially harming user experience and SEO if such links become invalid over time.

  • Manual monitoring required:
    Since automatic link checking is bypassed, it requires more manual oversight to ensure all skipped links remain valid.