WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#14681 closed defect (bug) (maybelater)

# of external links is not properly counted / extensible

Reported by: hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.1
Component: General Keywords: has-patch
Focuses: Cc:

Description

A base feature of wordpress comment/discussion option is to put a comment into moderation if it contains more than x external links (comment_max_links option).

This functionality is broken because the number of external links (as announced in the code) is not properly calcualted.

For example, relative links as well as links to the same page are calculated.

To Fix this issue, it could be argumented that not the number of external links should be measured but only the number of links.

This argumentation comes with the price that the motivation of this option is undermined. The motivation is to count external links because only external links are used in link spam. Link spam is done by spamming commments.

Even when paying that price (and rendering the option pretty useless so to force users to use third-party tools), a bit problem is, that a plugin can not hook into the current implementation because the call to the comment_max_links_url filter does not pass the comment text.

Attachments (1)

14681.patch (793 bytes) - added by hakre 4 years ago.
Adding a filter to enable plugin authors to override the current way of counting all comment links, so to be able to provide a count of external links only.

Download all attachments as: .zip

Change History (5)

hakre4 years ago

Adding a filter to enable plugin authors to override the current way of counting all comment links, so to be able to provide a count of external links only.

comment:1 hakre4 years ago

Related: #14680

comment:2 hakre4 years ago

Related: #11684
Related: #11359
Related: #8627

comment:3 hakre4 years ago

Related: #14856

comment:4 westi3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

We don't need an extra filter here.

If there are issues with the link counting then we should create test cases and write a patch to fix them.

Note: See TracTickets for help on using tickets.