[wp-trac] [WordPress Trac] #48022: Support "ugc" rel attribute value in comments
WordPress Trac
noreply at wordpress.org
Wed Oct 16 18:53:09 UTC 2019
#48022: Support "ugc" rel attribute value in comments
-------------------------------------------------+-------------------------
Reporter: audrasjb | Owner:
| SergeyBiryukov
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 5.3
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has-dev- | Focuses:
note needs-testing |
-------------------------------------------------+-------------------------
Changes (by desrosj):
* keywords: has-patch has-unit-tests has-dev-note => has-patch has-unit-
tests has-dev-note needs-testing
Comment:
Dug in a bit here.
`wp_rel_ugc()` is attached to the `pre_comment_content` filter which
happens before the comment is saved. However, the function that makes
plain text URLs clickable (`make_clickable()`) is hooked onto
`comment_text`, which happens when the comment is output.
It looks like `rel="nofollow"` is hardcoded within `make_clickable()`.
This could be fixed by simply adding `ugc` to that (which
[attachment:"48022.2.diff"] does).
On first glance, `make_clickable()` is only used for comment content in
Core. However, I'm not sure how it is being used by plugins and themes in
the wild.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48022#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list