![](https://secure.gravatar.com/avatar/15f5e6abf26f57e1838c29a8356ce7f8.jpg?s=120&d=mm&r=g)
Ted Gould wrote:
On Sat, 2007-03-31 at 00:32 +0200, J.B.C.Engelen@...1578... wrote:
I just fixed a bug: string parameters were not escaped
causing problems when using " . Also $ bugs on linux, because it tries to replace $... with a defined variable; if there are other operating systems that need escaping of $ aswell, please add them to the #ifdef in /src/extension/parameter.cpp line 19.
Sounds like something good to do, I'm curious if we shouldn't do it more generally in the script implementation though.
I thought quickly about this but decided to make a quick fix for only the string parameters. I think it is definitely not straightforward to correct a complete command line. Consider this example:
the script extension.py has 2 parameters: string1 and string2. The user enters: string1: ' type:" --param="test" " at the commandline ' string2: ' hello '
The (unescaped) command line will look like: python extension.py --string1="type:" --param="test" " at the commandline" --string2="hello"
It should look like: python extension.py --string1="type:" --param="test" " at the commandline" --string2="hello" But could just aswell mean (if the corrector does not know which parameters exist): python extension.py --string1="type:" --param="test" " at the commandline" --string2="hello"
Regards, Johan