Make WordPress Core


Ignore:
Timestamp:
09/30/2019 01:29:10 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Comments: Add rel="nofollow ugc" attribute to links in comments.

UGC stands for User Generated Content, and the ugc attribute value is recommended for links within user generated content, such as comments and forum posts.

See https://webmasters.googleblog.com/2019/09/evolving-nofollow-new-ways-to-identify.html.

Props audrasjb, joostdevalk, dkarfa, SergeyBiryukov.
Fixes #48022.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r46335 r46349  
    225225        $return = $author;
    226226    } else {
    227         $return = "<a href='$url' rel='external nofollow' class='url'>$author</a>";
     227        $return = "<a href='$url' rel='external nofollow ugc' class='url'>$author</a>";
    228228    }
    229229
Note: See TracChangeset for help on using the changeset viewer.