Re: Parameters with single and double quotes

Will Partain <[email protected]> Mon, 16 Jun 2003 11:28:44 +0100
Newsgroups gmane.comp.sysutils.ark.devel
Message-ID <[email protected]>
Joel S writes:

> It appears that the expandParams method of ArkRunnable in
> ARK/arkbase/ark/thing.py calls the metaQuote function in
> ARK/arkbase/ark/utils.py, which tries to handle quotes and
> other special characters.  When a string contains single
> quotes, metaQuote wraps the string in double quotes, but
> does not escape any embedded double quotes.  I think this
> could be fixed by adding another string.replace around line
> 980 in utils.py (and renumbering the subsequent intermediate
> strings):
> 
>        # use a double-quote; quote all the weird chars:
>        str1 = string.replace(str ,'\\','\\\\')
>        str2 = string.replace(str1,'$', '\\$')
> +     str3 = string.replace(str2,'"', '\\"')

Could you let us know how you get along with a change like that?
I'll snoop around myself, meanwhile...

Summary: you're doomed if I wrote the code :-)

Will


-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5