Add noreferrer and ugc to links#9047
Merged
andreslucena merged 3 commits intodecidim:developfrom Mar 21, 2022
PierreMesure:Add-noreferrer-and-ugc-to-links
Merged
Add noreferrer and ugc to links#9047andreslucena merged 3 commits intodecidim:developfrom PierreMesure:Add-noreferrer-and-ugc-to-links
andreslucena merged 3 commits intodecidim:developfrom
PierreMesure:Add-noreferrer-and-ugc-to-links
Conversation
ahukkanen
approved these changes
Mar 21, 2022
Contributor
ahukkanen
left a comment
There was a problem hiding this comment.
LGTM, good improvement!
Member
|
Can you please backport to v0.26-stable 🙏🏽? Thanks |
andreslucena
pushed a commit
that referenced
this pull request
Mar 22, 2022
Member
No need to do it anymore, I already opened the backport at #9078, as I want to clean the 'backport pending' backlog so we can publish Thanks for the PR @PierreMesure!! |
Contributor
Author
|
Great, thank you! |
19 tasks
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
To discourage spam bots from using Decidim platforms to promote their websites and gain SEO juice.
The following keywords have been added to the personal URL of profile pages and links in the body of personal messages, comments, debates...
noreferrer(source), which instructs the browser not to pass the URL of the Decidim platform as a referrer to the opened URL. This will effectively prevent a spammer from tracking how much traffic they get from adding their link to the platform.ugc(source), which stands for user-generated content and is a new keyword introduced by Google a few years ago to replacenofollowwhich was too general.As this article explains, Google introduced
ugcin 2019 but the way they interpret it is still evolving and they still have to deal with a legacy of websites only usingnofollowto qualify all unapproved content (as Decidim does today). So adding the keyword is a way to make Decidim compatible with it already now and gives search engines a thinner way to characterise user-generated content on it.An important remark is that the
link_rendererthat this PR modifies is only used in very few cases (the main ones being comments and private messages) so there are many examples of user-generated content that will not benefit of that change. A few examples are:It would be interesting to refactor this helper so it can be applied more easily to all type of user-generated content.
📌 Related Issues
Testing
Just check a link on a user profile, in a comment or a proposal for the presence of
rel="nofollow noopener noreferrer ugc"📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots
No visual changes