function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
efantiniefantini 

Problem with URL and WIL containing spaces

Apparently, in a web integration link, URL like the following :

http://timespace.agsmtel.it/TimeSpace/AGSMTEL/Offerte/{!Account_Name}/{!Opportunity_Name}/

are mistranslated into :

https://timespace.agsmtel.it/TimeSpace/AGSMTEL/Offerte/Vecomp+Impresa/Connettivit%C3%A0+sede/

with a space translated as a + instead of %20.

Within java script this does not occour because you can use the urlencode function. Can we use the same trick in here or do we have any special sintax to avoid it?

Many thanks

Enrico Fantini

 

 

zakzak
the + character is the correct escaping of space, see the html forms spec
http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1

Cheers
Simon
efantiniefantini

yes, sure. But what should i do then if tomcat is configured to translate spaces as %20?

Thanks

Regards

Enrico Fantini

SuperfellSuperfell
If tomcat is not decoding the + back to a space, then log a bug with the tomcat folks.
mikepropelmikepropel
I had the same problem.

I used java.util.regex.replaceAll()in my jsp to substitute %20 for all the +'s in the incoming URL.

In my case I had spaces in a parameter called company and I replaced all of them with %20 by adding the following (remember to escape the + and the % with \\)...

String companyName = request.getParameter("company").replaceAll("\\+","\\%20");

Hope it works for you too.