# CakePHP 3.4.2 autoLinkUrls failing on %

**URL:** <https://discourse.cakephp.org/t/cakephp-3-4-2-autolinkurls-failing-on/2234>\
**Category:** Uncategorized\
**Created:** [March 15, 2017, 1:15am UTC](https://discourse.cakephp.org/t/cakephp-3-4-2-autolinkurls-failing-on/2234 "2017-03-15T01:15:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![naidim](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/naidim/32/238_2.png) [@naidim](https://discourse.cakephp.org/u/naidim)\
**Post date:** [March 15, 2017, 1:15am UTC](https://discourse.cakephp.org/t/cakephp-3-4-2-autolinkurls-failing-on/2234/1 "2017-03-15T01:15:20Z")

</div>

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

Is this working as intended or a bug.

---

<div class="post-metadata">

**Author:** ![Bird87](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/bird87/32/405_2.png) [@Bird87](https://discourse.cakephp.org/u/Bird87)\
**Post date:** [March 17, 2017, 8:58am UTC](https://discourse.cakephp.org/t/cakephp-3-4-2-autolinkurls-failing-on/2234/2 "2017-03-17T08:58:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![naidim](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/naidim/32/238_2.png) [@naidim](https://discourse.cakephp.org/u/naidim)\
**Post date:** [March 17, 2017, 11:32am UTC](https://discourse.cakephp.org/t/cakephp-3-4-2-autolinkurls-failing-on/2234/3 "2017-03-17T11:32:08Z")

</div>

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

$practitioner-\>events = `"Yoga in Healthcare: The History, the Science, the Practice: https://www.uvm.edu/medicine/pih/Yoga%20in%20Healthcare%2010_6_16.mp4"`

The result = `Yoga in Healthcare: The History, the Science, the Practice: <a href="https://www.uvm.edu/medicine/pih/Yoga">https://www.uvm.edu/medicine/pih/Yoga</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. ☹

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

---

<div class="post-metadata">

**Author:** ![Bird87](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/bird87/32/405_2.png) [@Bird87](https://discourse.cakephp.org/u/Bird87)\
**Post date:** [March 17, 2017, 11:53am UTC](https://discourse.cakephp.org/t/cakephp-3-4-2-autolinkurls-failing-on/2234/4 "2017-03-17T11:53:05Z")

</div>

%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.
