[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 18:45:34 UTC 2024
#62037: make_clickable doesn't handle closing parenthesis character just before the
'dot' on a file URL.
--------------------------+------------------------------
Reporter: rhellewell@… | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by hellofromTonya):
Thanks for clarifying @rhellewellgmailcom.
To isolate it to just the `make_clickable()` function, I added a `wp-
content/mu-plugins/test.php` file with the following code:
{{{#!php
<?php
add_action( 'init', function() {
$test_url = 'https://www.example.com/some-page(2).jpg';
$results = make_clickable( $test_url );
var_dump( $results );
exit;
});
}}}
On both WordPress 6.5.4 and 6.6.2, the returned string from
`make_clickable()` was:
{{{
<a href="https://www.example.com/some-page(2)"
rel="nofollow">https://www.example.com/some-page(2)</a>.jpg
}}}
Interesting.
In looking at the tests mentioned in comment:6, none of those tests cover
a use case where the `(blah)` appears before a `.` extension. Interesting.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62037#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list