Thanks Ben - Its nice to know whats happening behind the scenes.

Good point about fixing the web server - I've managed to convince the vendor they should clean up their web service, so the pipe character, which is encoded as %7c, is now being properly recognized - woo!

Thanks again!

Lou

On Apr 17, 2009, at 2:12 PM, Benjamin Wolsey wrote:

Am Freitag, den 17.04.2009, 12:58 -0400 schrieb Lou Klepner:
?values=1|2|3

When I call it using LoadVariables, the pipe symbol is being URL-
encoded, and the web-service ends up receiving this request -

?values=1%7c2%7c3

Unfortunately the webservice is outside my control and I can't url-
decode its input. Is there anyway to prevent LoadVariables from
altering the pipe symbol?


Do you mean LoadVars or MovieClip.loadVariables?

If LoadVars, then yes, but it isn't very nice. LoadVars.send() probably
calls LoadVars.toString(), which definitely calls _global.escape().
Redefine _global.escape:

_global.escape = function(str) { return str; };

And when you call LoadVars.send(), the string won't be encoded
(at all), and neither will anything else unless you restore it to what
it was.

A similar thing likely applies to MovieClip.loadVariables.

Of course, a better way would be to fix the server.

bwy

--
Use Gnash, the GNU Flash Player!
http://www.gnu.org/software/gnash/

Benjamin Wolsey, Software Developer - http://benjaminwolsey.de

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to