We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Help Needed: target="_blank" and rel="noopener" Attributes Being Automatically Removed

Help Needed: target="_blank" and rel="noopener" Attributes Being Automatically Removed

JJ25
Visitor
2 0 0

Hi Shopify Community,

I am experiencing a challenge with custom HTML on my Shopify site. I've added external links with target="_blank" and rel="noopener" attributes for security and user experience. However, after saving my changes, Shopify is removing the rel="noopener" attribute while keeping the target="_blank" intact.

Original code snippet:

<a href="https://www.example.com" title="Example" target="_blank" rel="noopener">Example Link</a>

Altered by Shopify:

<a href="https://www.example.com" title="Example" target="_blank">Example Link</a>

Has anyone else encountered this issue and found a solution to retain the rel="noopener" attribute for external links? Any insights or workarounds would be greatly appreciated.

Thank you!

Replies 0 (0)