[osflash] Automagic URL encoding of variables in FlashObject?
geoff at deconcept.com
Wed Aug 17 21:56:46 PDT 2005
doesn't have a reliable urlencode function.
encode() chokes on double byte chars (the first version of flashobject
used encode() by default, but was later removed due to the double byte
so i would have liked to replace it with encodeURIcomponent(), but that
doesn't have good enough support throughout the browsers i wanted to
support. at some point in the future i'm sure i'll reevaluate this, but
for now i'd rather leave it out.
writing a custom URLencode() function i don't really like because it
adds bloat to the script that many people will not use much.
which is why it's set at the current state, where you have the option of
using encode(), which will work in most cases, or encodeURLcomponent()
if you dont' mine cutting out older browsers, or doing server side
encoding as you mention.
so that's the history behind that - bob ippolito actually put the
encode() back in for his flashobject implementation that is in the JSAN
library, but just marked it with a comment about the double byte char
>What do you think about the idea of URL encoding the variables that one
>can add in the HTML?
>We would have this in the HTML:
>and it would automatically be converted to:
>The addVariable method would need to be modified with something like
>value = this.URLencode(value);
>and we would have to include the URLencode method in FlashObject. A
>simple escape() doesn't work.
>Most of us have an URL encoder somewhere and most of the FlashVars are
>provided by server-side scripts, but at times a customer needs to modify
>the value of one of the variable and even for us, it's so much faster to
>just type in the value without having to preprocess it.
>osflash mailing list
>osflash at osflash.org
More information about the osflash