You need to sign in to do that
Don't have an account?
cmaxo
frontdoor.jsp apostrophes and double quotes
I am trying to use the frontdoor url trick to insert some data into the description field of a case. When the text that I am trying to insert contains the escaped version of an apostrophe I get a javascript error but it appears that everything gets inserted correctly. When the text contains the escaped version of a double quote I only get the text up to but not including the double quote. The rest of the text is gone.
Here is a sample url string: https://na1.salesforce.com/secur/frontdoor.jsp?sid=&retURL=%5C500%5Ce?cas3=John Richards%26cas14%3DImages Again%26cas15%3DThere%27s%20a%20lot%20of%20image%20requests
This adds a new case and prefills the Contact Name, Subject, and Description fields. If the browser has script debugging turned on a javascript error is thrown. If the %27 was replace by a %22 (double quote) then the description field would not show any of the text following the word _There_.
Does anyone know how I can resolve these issues?
Thanks,
Corey
Here is a sample url string: https://na1.salesforce.com/secur/frontdoor.jsp?sid=&retURL=%5C500%5Ce?cas3=John Richards%26cas14%3DImages Again%26cas15%3DThere%27s%20a%20lot%20of%20image%20requests
This adds a new case and prefills the Contact Name, Subject, and Description fields. If the browser has script debugging turned on a javascript error is thrown. If the %27 was replace by a %22 (double quote) then the description field would not show any of the text following the word _There_.
Does anyone know how I can resolve these issues?
Thanks,
Corey
Try escaping the ' and " with the HTML entities for those... I believe they are ' and " (Pretty sure about the 2nd one, the first is iffy).
Also when you put them in the url you'll need to escape the "&" symbol as %xx (I don't recall the hex value) I believe the ";" will be fine.
One other note: The URL in your post is malformed -- there are 2 "?" delimiters in it. One (correctly) after the .jsp and the 2nd after the retURL parameter before the cas3 parameter. That should be escaped to a %xx as well (I think it's 2F).
Just a thought... Let me know if it works for you tho, might be useful to bookmark
Edit... Well I confirmed my theory on the right HTML entities because the forum ate them and put in the ' and " marks instead... use &(sp)apos; and &(sp)quot; (remove the "(sp)")...
Message Edited by daroz on 04-29-2005 12:19 AM
https://na1.salesforce.com/secur/frontdoor.jsp?sid=sessionId&retURL=%5C500%5Ce%3Fcas3=John%20Richards%26cas14%3DA1s%26cas15%3DThere%26quot;s%20a%20lot%20of%20image%20requests%20John
But now the html encoding of the apostrophe causes all text after that to not appear:
https://na1.salesforce.com/secur/frontdoor.jsp?sid=sessionId&retURL=%5C500%5Ce%3Fcas3=John%20Richards%26cas14%3DA1s%26cas15%3DThere%26apos;s%20a%20lot%20of%20image%20requests%20John
Any other suggestions for the encoding of the apostrophe?
Thanks again,
Corey
Glad to see you got it further... but my only other suggestion would be to double encode the ' mark...
Something like
(From) There%26apos;s
(To) There%26amp;apos;s
And give that a try... Good luck.
Edit One other thought -- try escaping it with a \ like \' if it still doesn't work. Not sure if the server is parsing it (the jsp) or the client...
Message Edited by daroz on 05-01-2005 11:41 PM