diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | lib/MDK/Common/System.pm | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -1,6 +1,7 @@ Version 1.2.17 - 10 March 2009, by Pascal Terjan - protect various chars in setExportedVarsInSh and setExportedVarsInCsh +- quote correctly ' inside '' Version 1.2.16 - 2 February 2009, by Pascal Terjan diff --git a/lib/MDK/Common/System.pm b/lib/MDK/Common/System.pm index 419a8d4..05003bb 100644 --- a/lib/MDK/Common/System.pm +++ b/lib/MDK/Common/System.pm @@ -371,7 +371,7 @@ sub setVarsInSh { sub quoteForSh { my ($val) = @_; if ($val =~ /["`\$]/) { - $val =~ s/(')/\\$1/g; + $val =~ s/(')/$1\\$1$1/g; $val = qq('$val'); } elsif ($val =~ /[\(\)'|\s\\;<>&#\[\]~{}*?]/) { $val = qq("$val"); |