CakePHP 3.4.2 autoLinkUrls failing on %

Text->autoLinkUrls only links up to the first % sign.

Is this working as intended or a bug.

Post your code that is causing the issue so we can assist.

echo $this->Text->autoLinkUrls($practitioner->events);

$practitioner->events = "Yoga in Healthcare: The History, the Science, the Practice:"

The result = Yoga in Healthcare: The History, the Science, the Practice: <a href=""></a>%20in%20Healthcare%2010_6_16.mp4

I’d prefer not having %20 in my urls, but that isn’t my call, they are remote links controlled by someone else. :frowning:

My workaround isn’t ideal, but works: echo str_replace('zzzzz', '%20', $this->Text->autoLinkUrls(str_replace('%20', 'zzzzz', $practitioner->events)));

%20 is a placeholder for a space in the URL.

Looking at the actual code for the autoLinkUrls method, your workaround is all that will work, as there is no flag that you can set that does not prevend this behaviour.