diff options
-rwxr-xr-x | config-db/slxconfig | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/config-db/slxconfig b/config-db/slxconfig index d59215ed..11e1d602 100755 --- a/config-db/slxconfig +++ b/config-db/slxconfig @@ -190,12 +190,18 @@ sub parseKeyValueArgs } my $key = lc($1); my $value = $2; - if ($value eq '-') { - $value = undef; - } if (!grep { $_ eq $key } @$allowedKeys) { die _tr("unknown key '%s' specified for %s\n", $key, $table); } + + if ($value eq '-') { + $value = undef; + } + + # replace escaped newlines and tab chars by the respective real thing + $value =~ s{\\n}{\n}gms; + $value =~ s{\\t}{\t}gms; + $dataHash{$key} = $value; } @@ -221,6 +227,11 @@ sub parseKeyValueArgsWithAttrs if ($value eq '-') { $value = undef; } + + # replace escaped newlines and tab chars by the respective real thing + $value =~ s{\\n}{\n}gms; + $value =~ s{\\t}{\t}gms; + if (grep { $_ eq $key } @$allowedKeys) { $dataHash{$key} = $value; } elsif (grep { $_ eq $key } @$allowedAttrKeys) { |