Make WordPress Core

Opened 9 years ago

Closed 9 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:


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 9 years ago.
Attached patch

Download all attachments as: .zip

Change History (4)

9 years ago

Attached patch

#1 @piouPiouM
9 years ago

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

#2 @Denis-de-Bernardy
9 years ago

  • Keywords tested added
  • Milestone changed from Unassigned to 2.8

#3 @ryan
9 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.