[wp-trac] [WordPress Trac] #23050: make_clickable incorrectly formats anchors with URL's and spaces in them in comments

WordPress Trac noreply at wordpress.org
Thu Dec 12 01:54:01 UTC 2013


#23050: make_clickable incorrectly formats anchors with URL's and spaces in them in
comments
-----------------------------+------------------------------
 Reporter:  johnjamesjacoby  |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Formatting       |     Version:  3.4.2
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |
-----------------------------+------------------------------

Comment (by netweb):

 PHPUnit tests using
 [http://core.trac.wordpress.org/attachment/ticket/23050/23050-ala-23757.diff
 23050-ala-23757.diff]


 `phpunit --group "formatting,23050"` - 23050-unit-tests-nofollow.diff -
 Resulting links WITH rel="nofollow"
 {{{
 #!bash
 Time: 11 seconds, Memory: 43.75Mb

 There were 2 failures:

 1) Tests_Formatting_MakeClickable::test_anchors_with_url_and_words
 Failed asserting that two strings are equal.
 --- Expected
 +++ Actual
 @@ @@
 -'Hey! <a href="http://wordpress.org" rel="nofollow">http://wordpress.org
 is awesome</a> if you have clicks to give!'
 +'Hey! <a href="http://wordpress.org">http://wordpress.org is awesome</a>
 if you have clicks to give!'

 C:\xampp\htdocs\develop.wp.nw\tests\phpunit\tests\formatting\MakeClickable.php:390

 2) Tests_Formatting_MakeClickable::test_square_brackets
 Failed asserting that two strings are equal.
 --- Expected
 +++ Actual
 @@ @@
 -'<a href="http://example.com/?foo%5Bbar%5D=baz"
 rel="nofollow">http://example.com/?foo%5Bbar%5D=baz</a>'
 +'<a href="http://example.com/?foobar=baz"
 rel="nofollow">http://example.com/?foobar=baz</a>'

 C:\xampp\htdocs\develop.wp.nw\tests\phpunit\tests\formatting\MakeClickable.php:434

 FAILURES!
 Tests: 557, Assertions: 1430, Failures: 2, Incomplete: 1, Skipped: 27.
 }}}

 `phpunit --group "formatting,23050"` - 23050-unit-tests.diff - Resulting
 links WITHOUT rel="nofollow"
 {{{
 #!bash
 Time: 6 seconds, Memory: 43.00Mb

 OK, but incomplete or skipped tests!
 Tests: 557, Assertions: 1433, Incomplete: 1, Skipped: 28.

 }}}

 `phpunit --group "formatting"` i.e. without any of the 23050 unit tests
 {{{
 #!bash
 Time: 7 seconds, Memory: 43.25Mb

 OK, but incomplete or skipped tests!
 Tests: 556, Assertions: 1428, Incomplete: 1, Skipped: 28.
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/23050#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list