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


I'm using the web links for some integration with the professional version. One of the problems I have is passing potential company names with control characters in the name as that breaks the web link.

Is there any way to escape the actual results being added to a weblink if the data being returned contains a control character such as an ampersand (&

an example:

A company name is sent in a web link as: Shell Oil & Gas  instead of Shell%20Oil%20%26%20Gas

due to the fact that I have to integrate the Professional version, I am limited to not using the API which means I have to do some sort of integration with the web links and I can make this work except for when these values contain a control character such as this.

Seems like a no brainer that the escape be applied by SalesForce if the value is being used in a weblink, but who knows. Any help would be appreciated.


Message Edited by mwilkes on 08-24-2004 10:09 AM


Hi mwilkes,

I will file as a bug.  We should be escaping values that are merged into a url, no question.




Thanks for the quick reply! Is there a timeframe for how long issue like this take to resolve? 2 Weeks, 5 Weeks, Winter Release

Just need to get an estimated timeframe for reporting this back to the boss...

Thanks again,

Mike Wilkes


Hi mwilkes,

Actually, I can't reproduce this.  When I create a web link using the account name merge field to a test web site, the url resolves to http://localhost/ForumWeb/WebLinkEscapeTest.aspx?accountname=United+Oil+%26+Gas%2C+UK which is clearly escaped.  I think your problem lies elsewhere.  What is your web server/app server platform and how are you processing the request parameters?


I'm using IIS 5 on a win2K server. Let me look harder at my code, it has to be something on my end, every time I have sent a URL to my server from the app, it is recieved by my machine without the escaped characters but that doesn't rule it out from being on my end...

Maybe there is some sort of stupid ISAPI filter in place




So, I am using xp with IIS 5.  As a simple test I put this code in the page_load method:

for (int i=0;i<Request.Params.Count;i++)


Response.Write(Request.Params.Keys[i] + " - " + Request.Params[i] + "<BR>");


This will just spit out all the available keys and values in the Request.Params collection.

remember that both ASP and ASP.NET will auto decode the querystring parameters for you.

you guys were right, My script did two things:

a: Validate the User

b: Run a command specified in the URL

Well, it was running it fine for the validation, but by the time the command variable had been passed to the Command function, the value had been decoded (which didn't make any sense)  and also made the value look like it had not been escaped when sent originally.

long story short, I am now applying a forced Server.URLEncode on the values and it works fine.  

Glad to hear it.