Skip to content

Commit

Permalink
Item13776: More braces need escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Oct 2, 2015
1 parent 4c9a985 commit e4eff8d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions core/lib/Foswiki/Configure/FoswikiCfg.pm
Expand Up @@ -467,7 +467,7 @@ HERE
# Clean out deprecated settings, so they don't occlude the
# replacements
foreach my $key ( keys %Foswiki::Configure::Load::remap ) {
$this->{content} =~ s/\$Foswiki::cfg$key\s*=.*?;\s*//sg;
$this->{content} =~ s/\$Foswiki::cfg\Q$key\E\s*=.*?;\s*//sg;
}

# Sort keys so it's possible to diff LSC files.
Expand Down Expand Up @@ -534,14 +534,14 @@ sub startVisit {
# Substitute any existing value, or append if not there

unless ( $this->{content} =~
s/^\s*\$(?:Foswiki::)?cfg$keys\s*=.*?;\n/&_updateEntry($keys,$txt)/msge
s/^\s*\$(?:Foswiki::)?cfg\Q$keys\E\s*=.*?;\n/&_updateEntry($keys,$txt)/msge
)
{
$this->{content} .= $txt;
}
}
else {
$this->{content} =~ s/^\s*?\$(?:Foswiki::)?cfg$keys\s*=.*?;\n//msg;
$this->{content} =~ s/^\s*?\$(?:Foswiki::)?cfg\Q$keys\E\s*=.*?;\n//msg;
}
}
return 1;
Expand Down
4 changes: 2 additions & 2 deletions core/lib/Foswiki/Configure/TemplateParser/SimpleFreeMarker.pm
Expand Up @@ -182,8 +182,8 @@ sub _operator_list {
my $listItem = $contents;

# get property
$listItem =~ s/\${$local\}/$item/g;
$listItem =~ s/\${$local\.(.*?)\}/
$listItem =~ s/\$\{$local\}/$item/g;
$listItem =~ s/\$\{$local\.(.*?)\}/
defined $item->{$1} ? $item->{$1} : ''/ge;
$list .= $listItem;
}
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Configure/UIs/EXTENSIONS.pm
Expand Up @@ -137,7 +137,7 @@ sub _getListOfExtensions {

#probably a normal extensions FastReport. Item9786:
#content may contain '{','}' chars so anchor to newlines
$page =~ s/\n{(.*?)}\n/$this->_parseRow($1, $place)/ges;
$page =~ s/\n\{(.*?)\}\n/$this->_parseRow($1, $place)/ges;
}

}
Expand Down

0 comments on commit e4eff8d

Please sign in to comment.