# WeWeb replaces %20 in URL by space

**URL:** <https://community.weweb.io/t/weweb-replaces-20-in-url-by-space/7167>\
**Category:** How do I?\
**Tags:** design\
**Created:** [February 21, 2024, 7:48pm UTC](https://community.weweb.io/t/weweb-replaces-20-in-url-by-space/7167 "2024-02-21T19:48:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BertrandG](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/bertrandg/32/5129_2.png) [@BertrandG](https://community.weweb.io/u/BertrandG)\
**Post date:** [February 21, 2024, 7:48pm UTC](https://community.weweb.io/t/weweb-replaces-20-in-url-by-space/7167/1 "2024-02-21T19:48:41Z")

</div>

I generate an Upload URL using a WeWeb formula (I omitted the : in the URLs; otherwise the URL is not displayed here):

https//tally.so/r/xxxxxx?job\_id=17&JobName=4-1-1%20Just some new project (Job)&UploadLink=upload link

This URL is sent to a PDF generator. Clicking on this link in the PDF file **truncates the URL at the first space**.

I created a nice **JS Replace script** which works perfectly:

let upload\_url\_with\_spaces = variables[‘6803bcb4-73e7-4a36-93ed-874720082287’];  
let upload\_url = upload\_url\_with\_spaces.replace(/ /g, ‘%20’);

Result (perfect):  
https//tally.so/r/xxxxxx?job\_id=17&JobName=4-1-1%20Just some new project (Job)&UploadLink=upload link

BUT: WeWeb always sends the string **with** spaces via the API!

I also tried using a variable, but nothing helps.

The PDF generator does not alter the test string (I verified this):  
“upload\_link”: “https//tally.so/r/xxxxxx?job\_id=17&JobName=4-1-1%20Just%20some%20new%20project%20(Job)&UploadLink=upload%20link”,

I also used this URL instead of a variable and then it works fine. **It seems WeWeb replaces the %20 by spaces.**

How can I avoid this?

---

<div class="post-metadata">

**Author:** ![BertrandG](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/bertrandg/32/5129_2.png) [@BertrandG](https://community.weweb.io/u/BertrandG)\
**Post date:** [February 25, 2024, 5:12pm UTC](https://community.weweb.io/t/weweb-replaces-20-in-url-by-space/7167/2 "2024-02-25T17:12:15Z")

</div>

I’m now using a temporary solution: I replace all **spaces** by **underline** \_. This doesn’t look nice but at least it doesn’t break the link.  
A better solution is warmly welcome.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [February 25, 2024, 8:10pm UTC](https://community.weweb.io/t/weweb-replaces-20-in-url-by-space/7167/3 "2024-02-25T20:10:08Z")

</div>

Hi @BertrandG 👋

Thanks for taking the time to share the workaround you found.

Not sure if this is a bug or expected web behavior. I’ll share your use case with the tech team so they can look into it.
