Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#26171 closed defect (bug) (fixed)

Unit Tests :: formatting function get_url_in_content

Reported by: mdbitz's profile mdbitz Owned by:
Milestone: 3.9 Priority: normal
Severity: minor Version:
Component: Formatting Keywords: has-patch
Focuses: Cc:

Description

Attached are unit tests of the get_url_in_content formatting function.

During review the function had different return values for cases when no links are found.

empty content => return ""
no links => return false;

I've attached a diff of the formatting.php file that normalizes this behavior to return false in all cases.

Attachments (2)

GetUrlInContent.php (1.2 KB) - added by mdbitz 11 years ago.
Unit Tests of get_url_in_content formatting function
26171.diff (635 bytes) - added by mdbitz 11 years ago.
modification to return false in all cases where no links exist, compliant with coding standards

Download all attachments as: .zip

Change History (4)

@mdbitz
11 years ago

Unit Tests of get_url_in_content formatting function

@mdbitz
11 years ago

modification to return false in all cases where no links exist, compliant with coding standards

#1 @nacin
11 years ago

  • Milestone changed from Awaiting Review to 3.9
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [26972]. Thanks for these, mdbitz. WordPress 3.9 has started up post-holidays and I'm looking forward to more of these. :-)

#2 @SergeyBiryukov
11 years ago

In 27019:

Remove byte order mark (BOM) from GetUrlInContent.php. see #26171.

Note: See TracTickets for help on using tickets.