[wp-trac] [WordPress Trac] #62037: make_clickable doesn't handle closing parenthesis character just before the 'dot' on a file URL.
WordPress Trac
noreply at wordpress.org
Thu Sep 12 19:25:48 UTC 2024
#62037: make_clickable doesn't handle closing parenthesis character just before the
'dot' on a file URL.
----------------------------------------+-----------------------------
Reporter: rhellewell@… | Owner: hellofromTonya
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.7
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: has-unit-tests needs-patch | Focuses:
----------------------------------------+-----------------------------
Changes (by hellofromTonya):
* keywords: has-patch has-unit-tests => has-unit-tests needs-patch
Comment:
Thank you @parthvataliya for the patch. Testing it with and without
[https://github.com/WordPress/wordpress-develop/pull/7343 PR 7343], it
causes these 2 datasets to fail:
{{{
1) Tests_Formatting_MakeClickable::test_urls with data set "URL with
brackets in path: trailing .)" ('blah blah http://en.wikipedia...h blah',
'blah blah <a href="http://en....h blah')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'blah blah <a
href="http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)"
rel="nofollow">http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)</a>.)
blah blah'
+'blah blah <a
href="http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)."
rel="nofollow">http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software).</a>)
blah blah'
/var/www/tests/phpunit/tests/formatting/makeClickable.php:76
2) Tests_Formatting_MakeClickable::test_urls with data set "URL with
brackets in path: trailing .)moreurl" ('blah blah http://en.wikipedia...h
blah', 'blah blah <a href="http://en....h blah')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'blah blah <a
href="http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)"
rel="nofollow">http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)</a>.)moreurl
blah blah'
+'blah blah <a
href="http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)."
rel="nofollow">http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software).</a>)moreurl
blah blah'
/var/www/tests/phpunit/tests/formatting/makeClickable.php:76
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62037#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list