WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#9390 closed defect (bug) (fixed)

make_clickable() makes fake URLs clickables.

Reported by: piouPiouM Owned by:
Milestone: 2.8 Priority: normal
Severity: minor Version: 2.8
Component: Template Keywords: has-patch tested
Focuses: Cc:

Description

If a string contains the words "ftp.", "www." or "http://" (and its SSL variant), make_clickable() will convert them into clickable links.

Actual results:

ftp.     => <a rel="nofollow" href="http://ftp">http://ftp</a>.
www.     => <a rel="nofollow" href="http://www">http://www</a>.
http://  => <a rel="nofollow" href="http://">http://</a>
https:// => <a rel="nofollow" href="https://">https://</a>
ftp.example.com. => <a rel="nofollow" href="http://ftp.example.com">http://ftp.example.com</a>.

Expected results:

ftp.     => ftp.
www.     => www.
http://  => http://
https:// => https://
ftp.example.com. => <a rel="nofollow" href="http://ftp.example.com">http://ftp.example.com</a>.

Attachments (1)

make_clickable.diff (1.2 KB) - added by piouPiouM 6 years ago.
Attached patch

Download all attachments as: .zip

Change History (4)

@piouPiouM6 years ago

Attached patch

comment:1 @piouPiouM6 years ago

  • Cc piouPiouM added
  • Keywords has-patch added
  • Version set to 2.8

comment:2 @Denis-de-Bernardy6 years ago

  • Keywords tested added
  • Milestone changed from Unassigned to 2.8

comment:3 @ryan6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10989]) make_clickable() regex fixes. Props piouPiouM. fixes #9390

Note: See TracTickets for help on using tickets.