Jump to content

Duplicate rel= in sharelinks templates


Go to solution Solved by Daniel F,

Recommended Posts

Posted

Hi,

Validating our website with the W3 validator tool, I found a glitch in the core > front > sharelinks templates, where the tag "rel=" is duplicated (there is a rel="nofollow" and a rel='noopener'; they should be combined as rel="nofollow noopener"). For example, the twitter template is:

<a href="http://twitter.com/share?url={$url}" rel="nofollow" class="cShareLink cShareLink_twitter" target="_blank" data-role="shareLink" title='{lang="twitter_text"}' data-ipsTooltip rel='noopener'>
	<i class="fa fa-twitter"></i>
</a>

But it should be:

<a href="http://twitter.com/share?url={$url}" rel="nofollow noopener" class="cShareLink cShareLink_twitter" target="_blank" data-role="shareLink" title='{lang="twitter_text"}' data-ipsTooltip>
	<i class="fa fa-twitter"></i>
</a>

The same happens in the linkedin, pinterest, and reddit templates.

Cheers.

  • Solution
Posted
30 minutes ago, SeNioR- said:

This wasn't fixed in 4.6.9 sometimes?

https://invisioncommunity.com/release-notes/

  • Fixed some missing rel=nofollow attributes on add new content links.
  • Fixed an issue where editing anonymous items could change the author.

Few instances were fixed, but this one was indeed missed.

Thanks for the report @Gabriel Torres, I have fixed it for an upcoming release:)

 

  • 1 month later...
Posted

@Daniel F Just a headsup that the example I gave above was fixed in 4.6.10, however, as I mentioned, the issue also affects other templates as well!

On 12/19/2021 at 3:23 PM, Gabriel Torres said:

The same happens in the linkedin, pinterest, and reddit templates.

These were not fixed in 4.6.10!

Here is what needs to be fixed!

linkedin

From:

<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url={$url}&amp;title={$title}" rel="nofollow" class="cShareLink cShareLink_linkedin" target="_blank" data-role="shareLink" title='{lang="lin_text"}' data-ipsTooltip rel='noopener'>
	<i class="fa fa-linkedin"></i>
</a>

To:

<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url={$url}&amp;title={$title}" rel="nofollow noopener" class="cShareLink cShareLink_linkedin" target="_blank" data-role="shareLink" title='{lang="lin_text"}' data-ipsTooltip>
	<i class="fa fa-linkedin"></i>
</a>

pinterest

From:

<a href="{$url}" class="cShareLink cShareLink_pinterest" rel="nofollow" target="_blank" data-role="shareLink" title='{lang="pinterest_text"}' data-ipsTooltip rel='noopener'>
	<i class="fa fa-pinterest"></i>
</a>

To:

<a href="{$url}" class="cShareLink cShareLink_pinterest" rel="nofollow noopener" target="_blank" data-role="shareLink" title='{lang="pinterest_text"}' data-ipsTooltip>
	<i class="fa fa-pinterest"></i>
</a>

reddit

From:

<a href="http://www.reddit.com/submit?url={$url}&amp;title={expression="urlencode( $title )"}" rel="nofollow" class="cShareLink cShareLink_reddit" target="_blank" title='{lang="reddit_text"}' data-ipsTooltip rel='noopener'>
	<i class="fa fa-reddit"></i>
</a>

To:

<a href="http://www.reddit.com/submit?url={$url}&amp;title={expression="urlencode( $title )"}" rel="nofollow noopener" class="cShareLink cShareLink_reddit" target="_blank" title='{lang="reddit_text"}' data-ipsTooltip>
	<i class="fa fa-reddit"></i>
</a>

I hope I have helped! 🙂

Cheers

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...