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?