Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

External link not working

Avatar

Level 3

Hi!

I am trying to link an external link (link below) to a teaser component but it's not working. I validated the url with the linker checker as well and it's valid. If I remove the # after spa in the url it works. Not sure why 2 # in the url are causing issue? Please advise

 

https://experience.adobe.com/#/@abc/so:genera8/analytics/spa/#/workspace/edit/62bb42dc03db540279a7db...

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @ReddyIshanvi 

 

The second # in the URL https://experience.adobe.com/#/@abc/so:genera8/analytics/spa/#/workspace/edit/62bb42dc03db540279a7db is converted to %23 . It is because the # character is used in URLs to indicate an anchor or fragment identifier.

The fragment identifier is used to identify a specific section within a web page. When the browser encounters a # character in a URL, it treats the following characters as a fragment identifier and navigates to the specified section of the web page.

However, when a # character appears after the fragment identifier, it is no longer considered part of the fragment identifier but as a literal character. Therefore, to include a literal # character in a URL, it needs to be encoded as %23.

In the URL you provided, the second # character appears after the fragment identifier (#/workspace/edit/62bb42dc03db540279a7db), so it is encoded as %23 to be treated as a literal character rather than as part of the fragment identifier.




Aanchal Sikka

View solution in original post

3 Replies

Avatar

Community Advisor

When I pasted the above link in browser I noticed that 2nd # is getting converted to %23. You need to check why this happened . Secondly you can skip the link validation on htl sightly using x-cq-linkchecker="valid" or skip.

Detail on http://www.wemblog.com/2011/10/how-to-make-sure-that-links-are-always.html?m=1

Avatar

Correct answer by
Community Advisor

Hello @ReddyIshanvi 

 

The second # in the URL https://experience.adobe.com/#/@abc/so:genera8/analytics/spa/#/workspace/edit/62bb42dc03db540279a7db is converted to %23 . It is because the # character is used in URLs to indicate an anchor or fragment identifier.

The fragment identifier is used to identify a specific section within a web page. When the browser encounters a # character in a URL, it treats the following characters as a fragment identifier and navigates to the specified section of the web page.

However, when a # character appears after the fragment identifier, it is no longer considered part of the fragment identifier but as a literal character. Therefore, to include a literal # character in a URL, it needs to be encoded as %23.

In the URL you provided, the second # character appears after the fragment identifier (#/workspace/edit/62bb42dc03db540279a7db), so it is encoded as %23 to be treated as a literal character rather than as part of the fragment identifier.




Aanchal Sikka