Permalink
Browse files

Item14605: More unescaped { braces

  • Loading branch information...
gac410 committed Jan 21, 2018
1 parent a3d11f5 commit 9ae136a50d4eae36acc5d4a653d9c9914ff40abe
@@ -23,7 +23,7 @@ sub check_current_value {
if ( ref($v) ) {
$reporter->ERROR("Was expecting entry $ec to be a scalar");
}
if ( $v !~ /^({\w+})+$/ ) {
if ( $v !~ /^(\{\w+\})+$/ ) {
$reporter->ERROR("Was expecting '$v' to be a cfg key");
}
$ec++;
@@ -50,8 +50,8 @@ If compression is enabled, it also compresses the language file.
sub onSave {
my ( $this, $reporter, $key, $d, $old_dir ) = @_;
$d =~ s/\$Foswiki::cfg({\w+})+/eval( "\$Foswiki::cfg$1")/ge;
$old_dir =~ s/\$Foswiki::cfg({\w+})+/eval( "\$Foswiki::cfg$1")/ge;
$d =~ s/\$Foswiki::cfg(\{\w+\})+/eval( "\$Foswiki::cfg$1")/ge;
$old_dir =~ s/\$Foswiki::cfg(\{\w+\})+/eval( "\$Foswiki::cfg$1")/ge;
return if ( $d eq $old_dir );
@@ -109,7 +109,7 @@ sub onSave {
# Automatic upgrade of work_areas
my $existing = $old_dir || $Foswiki::cfg{Store}{WorkAreaDir} || '';
$existing =~ s/\$Foswiki::cfg({\w+})+/eval( "$Foswiki::cfg$1")/ge;
$existing =~ s/\$Foswiki::cfg(\{\w+\})+/eval( "$Foswiki::cfg$1")/ge;
if ( $existing && -d $existing ) {
# Try and move the contents of the old workarea

0 comments on commit 9ae136a

Please sign in to comment.