Item14757: indirect " Unescaped left brace in regex is deprecated"
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release:
In two places,
ActionTrackerPlugin calls Foswiki::Func::searchInWebContent() with a regex that contains an unescaped left brace. This is my fix:
diff --git a/lib/Foswiki/Plugins/ActionTrackerPlugin/ActionNotify.pm b/lib/Foswiki/Plugins/ActionTrackerPlugin/ActionNotify.pm
index 1d0a4b71..ef29bfd3 100644
--- a/lib/Foswiki/Plugins/ActionTrackerPlugin/ActionNotify.pm
+++ b/lib/Foswiki/Plugins/ActionTrackerPlugin/ActionNotify.pm
@@ -460,7 +460,7 @@ sub _findChangesInWeb {
my @tops = Foswiki::Func::getTopicList($web);
my $grep = Foswiki::Func::searchInWebContent(
- '%ACTION{.*}%',
+ '%ACTION\{.*}%',
$web,
\@tops,
{
diff --git a/lib/Foswiki/Plugins/ActionTrackerPlugin/ActionSet.pm b/lib/Foswiki/Plugins/ActionTrackerPlugin/ActionSet.pm
index 64d39999..6cacd027 100644
--- a/lib/Foswiki/Plugins/ActionTrackerPlugin/ActionSet.pm
+++ b/lib/Foswiki/Plugins/ActionTrackerPlugin/ActionSet.pm
@@ -310,7 +310,7 @@ sub allActionsInWeb {
@tops = grep( /^$topics$/, @tops ) if ($topics);
my $grep = Foswiki::Func::searchInWebContent(
- '%ACTION{.*}%',
+ '%ACTION\{.*}%',
$web,
\@tops,
{
--
FlorianSchlichting - 04 Sep 2018
I should add that this is the somewhat obscure error message I see in the Apache log:
[Tue Sep 4 14:06:09 2018] view: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%ACTION{ <-- HERE .*}%/ at /path/to/lib/Foswiki/Store/SearchAlgorithms/PurePerl.pm line 81, <$file> line 1.: /path/to/bin/view
--
FlorianSchlichting - 04 Sep 2018
Feel free to create a new release and upload it to the Extensions web.
--
MichaelDaum - 04 Sep 2018