Skip to:

Opened 3 months ago

Last modified 3 months ago

#8326 new enhancement

Apply UGC attribute for activity links

Reported by: vapvarun Owned by:
Milestone: 7.0.0 Priority: normal
Severity: normal Version: 6.1.0
Component: Activity Keywords: has-patch 2nd-opinion


Recently Google has updated its policy for nofollow attributes and they will be considered as hints.

Link attribution can be done in three ways: "nofollow", "sponsored", and "ugc" — each signifying a different meaning. (The fourth way, default, means no value attributed).

Activities are in general user-generated content, we can use UGC instead of nofollow or combination of both attributes.

for example, rel="nofollow ugc" is also valid.

Attachments (1)

8326.patch (982 bytes) - added by vapvarun 3 months ago.
nofollow with UGC

Download all attachments as: .zip

Change History (4)

3 months ago

nofollow with UGC

#1 @imath
3 months ago

  • Keywords has-patch commit added
  • Milestone changed from Awaiting Review to 7.0.0

Thanks a lot @vapvarun let’s do it!

#2 @imath
3 months ago

  • Keywords 2nd-opinion added; commit removed

I just had another look into it, what happens for activities containing links before this patch is applied ? I believe they shouldn't have the ugc rel attribute.

We should probably do str_replace( array( ' rel="nofollow"', " rel='nofollow'", ' rel="nofollow ugc"', " rel='nofollow ugc'"), '', $text ). What do you think?

#3 @vapvarun
3 months ago

@imath yes it will be more general scope, I had considered that Nofollow is added using the above filter almost all activities as HTML is not allowed in general unless admins have added with Nofollow manually on purpose.

With the initial approach, it will allow them to keep those links with nofollow only without UGC on which they have added Nofollow manually. eg

Last edited 3 months ago by vapvarun (previous) (diff)
Note: See TracTickets for help on using tickets.