X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/bc4721da0441a30822225c51b250be4cc5f8af24..f282512da75d19e38933f3083afa3c2a9dad463c:/IkiWiki/Wrapper.pm diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index ffbaf9908..4c99cdaa0 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -63,7 +63,8 @@ EOF if (ref $config{ENV} eq 'HASH') { foreach my $key (keys %{$config{ENV}}) { my $val=$config{ENV}{$key}; - $val =~ s/([\\"])/\\$1/g; + utf8::encode($val) if utf8::is_utf8($val); + $val =~ s/([^A-Za-z0-9])/sprintf '""\\x%02x""', ord($1)/ge; $envsize += 1; $envsave.=<<"EOF"; addenv("$key", "$val");