WeWeb replaces %20 in URL by space

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?

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.

Hi @BertrandG :wave:

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.