';
- $RegistrationForm =~ s/\%([a-z]+)\%/GetParam($1)/ige;
+ $RegistrationForm =~ s/\%([a-z]+)\%/GetParam($1)/egi;
$RegistrationForm =~ s/\$([a-z]+)\$/$q->span({-class=>'param'}, GetParam($1))
- . $q->input({-type=>'hidden', -name=>$1, -value=>GetParam($1)})/ge;
+ . $q->input({-type=>'hidden', -name=>$1, -value=>GetParam($1)})/eg;
print $RegistrationForm;
print '
';
PrintFooter();
@@ -271,9 +271,9 @@ sub DoLogin {
my $id = shift;
print GetHeader('', Ts('Login to %s', $SiteName), '');
print '';
- $LoginForm =~ s/\%([a-z]+)\%/GetParam($1)/ge;
+ $LoginForm =~ s/\%([a-z]+)\%/GetParam($1)/eg;
$LoginForm =~ s/\$([a-z]+)\$/$q->span({-class=>'param'}, GetParam($1))
- . $q->input({-type=>'hidden', -name=>$1, -value=>GetParam($1)})/ge;
+ . $q->input({-type=>'hidden', -name=>$1, -value=>GetParam($1)})/eg;
print $LoginForm;
print '
';
PrintFooter();
@@ -305,9 +305,9 @@ sub DoLogout {
print GetHeader('', Ts('Logout of %s', $SiteName), '');
print '';
print '
' . Ts('Logout of %s?',$SiteName) . '
';
- $LogoutForm =~ s/\%([a-z]+)\%/GetParam($1)/ge;
+ $LogoutForm =~ s/\%([a-z]+)\%/GetParam($1)/eg;
$LogoutForm =~ s/\$([a-z]+)\$/$q->span({-class=>'param'}, GetParam($1))
- . $q->input({-type=>'hidden', -name=>$1, -value=>GetParam($1)})/ge;
+ . $q->input({-type=>'hidden', -name=>$1, -value=>GetParam($1)})/eg;
print $LogoutForm;
print '
';
PrintFooter();
@@ -628,9 +628,9 @@ sub DoReset {
print GetHeader('', Ts('Reset Password for %s', $SiteName), '');
print '';
print '
' . T('Reset Password?') . '
';
- $ResetForm =~ s/\%([a-z]+)\%/GetParam($1)/ge;
+ $ResetForm =~ s/\%([a-z]+)\%/GetParam($1)/eg;
$ResetForm =~ s/\$([a-z]+)\$/$q->span({-class=>'param'}, GetParam($1))
- . $q->input({-type=>'hidden', -name=>$1, -value=>GetParam($1)})/ge;
+ . $q->input({-type=>'hidden', -name=>$1, -value=>GetParam($1)})/eg;
print $ResetForm;
print '
';
PrintFooter();
@@ -652,9 +652,9 @@ sub DoChangePassword {
print GetHeader('', Ts('Change Password for %s', $SiteName), '');
print '';
print '
' . T('Change Password?') . '
';
- $ChangePassForm =~ s/\%([a-z]+)\%/GetParam($1)/ge;
+ $ChangePassForm =~ s/\%([a-z]+)\%/GetParam($1)/eg;
$ChangePassForm =~ s/\$([a-z]+)\$/$q->span({-class=>'param'}, GetParam($1))
- . $q->input({-type=>'hidden', -name=>$1, -value=>GetParam($1)})/ge;
+ . $q->input({-type=>'hidden', -name=>$1, -value=>GetParam($1)})/eg;
print $ChangePassForm;
print '
';
PrintFooter();
diff --git a/modules/logout.pl b/modules/logout.pl
index 19477fa3..424685bc 100644
--- a/modules/logout.pl
+++ b/modules/logout.pl
@@ -201,10 +201,10 @@ sub CookieUsernameFix {
# Only valid usernames get stored in the new cookie.
my $name = GetParam('username', '');
if (!$name) { }
- elsif (!$FreeLinks && !($name =~ /^$LinkPattern$/o)) {
+ elsif (!$FreeLinks && !($name =~ /^$LinkPattern$/)) {
CookieUsernameFixDelete(Ts('Invalid UserName %s: not saved.', $name));
}
- elsif ($FreeLinks && (!($name =~ /^$FreeLinkPattern$/o))) {
+ elsif ($FreeLinks && (!($name =~ /^$FreeLinkPattern$/))) {
CookieUsernameFixDelete(Ts('Invalid UserName %s: not saved.', $name));
}
elsif (length($name) > 50) { # Too long
diff --git a/modules/mail.pl b/modules/mail.pl
index 98ab4bd3..83c76d66 100644
--- a/modules/mail.pl
+++ b/modules/mail.pl
@@ -84,7 +84,7 @@ sub MailNewInitCookie {
$q->delete('mail');
if (!$mail) {
# do nothing
- } elsif (!($mail =~ /$MailPattern/o)) {
+ } elsif (!($mail =~ /$MailPattern/)) {
$Message .= $q->p(Ts('Invalid Mail %s: not saved.', $mail));
} else {
SetParam('mail', $mail);
diff --git a/modules/markdown-rule.pl b/modules/markdown-rule.pl
index 9aec2b69..6f0509bf 100644
--- a/modules/markdown-rule.pl
+++ b/modules/markdown-rule.pl
@@ -45,14 +45,14 @@ sub MarkdownRule {
. AddHtmlEnvironment("p");
}
# setext headers
- elsif ($bol and m/\G((\s*\n)*(.+?)[ \t]*\n(-+|=+)[ \t]*\n)/gc) {
+ elsif ($bol and m/\G((\s*\n)*(.+?)[ \t]*\n(-+|=+)[ \t]*\n)/cg) {
return CloseHtmlEnvironments()
. (substr($4,0,1) eq '=' ? $q->h2($3) : $q->h3($3))
. AddHtmlEnvironment('p');
}
# > blockquote
# with continuation
- elsif ($bol and m/\G>/gc) {
+ elsif ($bol and m/\G>/cg) {
return CloseHtmlEnvironments()
. AddHtmlEnvironment('blockquote');
}
@@ -117,20 +117,20 @@ sub MarkdownRule {
. AddHtmlEnvironment('td');
}
# whitespace indentation = code
- elsif ($bol and m/\G(\s*\n)*( .+)\n?/gc) {
+ elsif ($bol and m/\G(\s*\n)*( .+)\n?/cg) {
my $str = substr($2, 4);
- while (m/\G( .*)\n?/gc) {
+ while (m/\G( .*)\n?/cg) {
$str .= "\n" . substr($1, 4);
}
return OpenHtmlEnvironment('pre',1) . $str; # always level 1
}
# ``` = code
- elsif ($bol and m/\G```[ \t]*\n(.*?)\n```[ \t]*(\n|$)/gcs) {
+ elsif ($bol and m/\G```[ \t]*\n(.*?)\n```[ \t]*(\n|$)/cgs) {
return CloseHtmlEnvironments() . $q->pre($1)
. AddHtmlEnvironment("p");
}
# [an example](http://example.com/ "Title")
- elsif (m/\G\[(.+?)\]\($FullUrlPattern(\s+"(.+?)")?\)/goc) {
+ elsif (m/\G\[(.+?)\]\($FullUrlPattern(\s+"(.+?)")?\)/cg) {
my ($text, $url, $title) = ($1, $2, $4);
$url =~ /^($UrlProtocols)/;
my %params;
diff --git a/modules/markup.pl b/modules/markup.pl
index ab5a7a4c..a343ebb7 100644
--- a/modules/markup.pl
+++ b/modules/markup.pl
@@ -142,18 +142,18 @@ sub MarkupTag {
}
sub MarkupRule {
- if ($bol and %MarkupLines and m/$markup_lines_re/gc) {
+ if ($bol and %MarkupLines and m/$markup_lines_re/cg) {
my ($tag, $str) = ($1, $2);
$str = $q->span($tag) . $str;
- while (m/$markup_lines_re/gc) {
+ while (m/$markup_lines_re/cg) {
$str .= $q->span($1) . $2;
}
return CloseHtmlEnvironments()
. MarkupTag($MarkupLines{UnquoteHtml($tag)}, $str)
. AddHtmlEnvironment('p');
- } elsif (%MarkupSingles and m/$markup_singles_re/gc) {
+ } elsif (%MarkupSingles and m/$markup_singles_re/cg) {
return $MarkupSingles{UnquoteHtml($1)};
- } elsif (%MarkupForcedPairs and m/$markup_forced_pairs_re/gc) {
+ } elsif (%MarkupForcedPairs and m/$markup_forced_pairs_re/cg) {
my $tag = $1;
my $start = $tag;
my $end = $tag;
@@ -168,20 +168,20 @@ sub MarkupRule {
$endre .= '[ \t]*\n?' if $block_element{$start}; # skip trailing whitespace if block
# may match the empty string, or multiple lines, but may not span
# paragraphs.
- if ($endre and m/\G$endre/gc) {
+ if ($endre and m/\G$endre/cg) {
return $tag . $end;
- } elsif ($tag eq $end && m/\G((:?.+?\n)*?.+?)$endre/gc) { # may not span paragraphs
+ } elsif ($tag eq $end && m/\G((:?.+?\n)*?.+?)$endre/cg) { # may not span paragraphs
return MarkupTag($data, $1);
- } elsif ($tag ne $end && m/\G((:?.|\n)+?)$endre/gc) {
+ } elsif ($tag ne $end && m/\G((:?.|\n)+?)$endre/cg) {
return MarkupTag($data, $1);
} else {
return $tag;
}
- } elsif (%MarkupPairs and m/$markup_pairs_re/gc) {
+ } elsif (%MarkupPairs and m/$markup_pairs_re/cg) {
return MarkupTag($MarkupPairs{UnquoteHtml($1)}, $2);
- } elsif ($MarkupPairs{'/'} and m|\G~/|gc) {
+ } elsif ($MarkupPairs{'/'} and m|\G~/|cg) {
return '~/'; # fix ~/elisp/ example
- } elsif ($MarkupPairs{'/'} and m|\G(/[-A-Za-z0-9\x{0080}-\x{fffd}/]+/$words/)|gc) {
+ } elsif ($MarkupPairs{'/'} and m|\G(/[-A-Za-z0-9\x{0080}-\x{fffd}/]+/$words/)|cg) {
return $1; # fix /usr/share/lib/! example
}
# "foo
diff --git a/modules/moin.pl b/modules/moin.pl
index 818dfd90..8f3e2ba3 100644
--- a/modules/moin.pl
+++ b/modules/moin.pl
@@ -64,13 +64,13 @@ sub MoinListLevel {
sub MoinRule {
# ["free link"]
- if (m/\G(\["(.*?)"\])/gcs) {
+ if (m/\G(\["(.*?)"\])/cgs) {
Dirty($1);
print GetPageOrEditLink($2);
return '';
}
# [[BR]]
- elsif (m/\G\[\[BR\]\]/gc) {
+ elsif (m/\G\[\[BR\]\]/cg) {
return $q->br();
}
# {{{
diff --git a/modules/multi-url-spam-block.pl b/modules/multi-url-spam-block.pl
index e3415dc3..6cf8ef21 100644
--- a/modules/multi-url-spam-block.pl
+++ b/modules/multi-url-spam-block.pl
@@ -46,13 +46,13 @@ sub NewMultiUrlBannedContent {
sub MultiUrlBannedContent {
my $str = shift;
- my @urls = $str =~ /$FullUrlPattern/go;
+ my @urls = $str =~ /$FullUrlPattern/g;
my %domains;
my %whitelist;
my $max = 0;
my $label = '[a-z]([a-z0-9-]*[a-z0-9])?'; # RFC 1034
foreach (split(/\n/, GetPageContent($MultiUrlWhiteList))) {
- next unless m/^\s*($label\.$label)/io;
+ next unless m/^\s*($label\.$label)/i;
$whitelist{$1} = 1;
}
foreach my $url (@urls) {
diff --git a/modules/namespaces.pl b/modules/namespaces.pl
index 862d7777..421b6a26 100644
--- a/modules/namespaces.pl
+++ b/modules/namespaces.pl
@@ -227,7 +227,7 @@ sub NewNamespaceGetRcLines { # starttime, hash of seen pages to use as a second
foreach my $file (@rcfiles) {
open(my $F, '<:encoding(UTF-8)', $file);
my $line = <$F>;
- my ($ts) = split(/$FS/o, $line); # the first timestamp in the regular rc file
+ my ($ts) = split(/$FS/, $line); # the first timestamp in the regular rc file
my @new;
if (not $ts or $ts > $starttime) { # we need to read the old rc file, too
push(@new, GetRcLinesFor($rcoldfiles{$file}, $starttime,\%match, \%following));
diff --git a/modules/near-links.pl b/modules/near-links.pl
index 886398f4..f56516eb 100644
--- a/modules/near-links.pl
+++ b/modules/near-links.pl
@@ -185,7 +185,7 @@ sub NewNearLinksResolveId {
my $id = shift;
my @result = OldNearLinksResolveId($id, @_);
my %forbidden = map { $_ => 1 } @UserGotoBarPages, %AdminPages;
- $forbidden{$id} = 1 if $CommentsPrefix and $id =~ /^$CommentsPrefix/o;
+ $forbidden{$id} = 1 if $CommentsPrefix and $id =~ /^$CommentsPrefix/;
if (not $result[1] and $NearSource{$id} and not $forbidden{$id}) {
$NearLinksUsed{$id} = 1;
my $site = $NearSource{$id}[0];
@@ -264,7 +264,7 @@ sub SearchNearPages {
if (%NearSearch and GetParam('near', 1) > 1 and GetParam('context',1)) {
foreach my $site (keys %NearSearch) {
my $url = $NearSearch{$site};
- $url =~ s/\%s/UrlEncode($string)/ge or $url .= UrlEncode($string);
+ $url =~ s/\%s/UrlEncode($string)/eg or $url .= UrlEncode($string);
print $q->hr(), $q->p(Ts('Fetching results from %s:', $q->a({-href=>$url}, $site)))
unless GetParam('raw', 0);
my $data = GetRaw($url);
diff --git a/modules/new-window.pl b/modules/new-window.pl
index 7c8149f5..604c1bc3 100644
--- a/modules/new-window.pl
+++ b/modules/new-window.pl
@@ -24,8 +24,8 @@ our ($q, @MyRules, $FullUrlPattern, $UrlProtocols, $BracketText);
push(@MyRules, \&NewWindowLink);
sub NewWindowLink {
# compare sub LinkRules in oddmuse.pl
- if ($BracketText && m/\G(\[new:$FullUrlPattern\s+([^\]]+?)\])/cog
- or m/\G(\[new:$FullUrlPattern\])/cog) {
+ if ($BracketText && m/\G(\[new:$FullUrlPattern\s+([^\]]+?)\])/cg
+ or m/\G(\[new:$FullUrlPattern\])/cg) {
my ($url, $text) = ($2, $3);
$url =~ /^($UrlProtocols)/;
my $class = "url $1"; # get protocol (http, ftp, ...)
diff --git a/modules/numbered-list.pl b/modules/numbered-list.pl
index e7868a59..ba394196 100644
--- a/modules/numbered-list.pl
+++ b/modules/numbered-list.pl
@@ -25,8 +25,8 @@ push(@MyRules, \&NumberedListRule);
sub NumberedListRule {
# numbered lists using # copied from usemod.pl but allow leading
# whitespace
- if ($bol && m/\G(\s*\n)*\s*(\#+)[ \t]/cog
- or InElement('li') && m/\G(\s*\n)+\s*(\#+)[ \t]/cog) {
+ if ($bol && m/\G(\s*\n)*\s*(\#+)[ \t]/cg
+ or InElement('li') && m/\G(\s*\n)+\s*(\#+)[ \t]/cg) {
return CloseHtmlEnvironmentUntil('li')
. OpenHtmlEnvironment('ol',length($2))
. AddHtmlEnvironment('li');
diff --git a/modules/olocalmap.pl b/modules/olocalmap.pl
index 7389eca9..eb96f899 100644
--- a/modules/olocalmap.pl
+++ b/modules/olocalmap.pl
@@ -111,14 +111,14 @@ sub LocalMapWorkHorse {
local $_ = $blocks[$i];
if ($WikiLinks
- && ($BracketWiki && m/\G(\[$LinkPattern\s+([^\]]+?)\])/cog
- or m/\G(\[$LinkPattern\])/cog or m/\G($LinkPattern)/cog)) {
+ && ($BracketWiki && m/\G(\[$LinkPattern\s+([^\]]+?)\])/cg
+ or m/\G(\[$LinkPattern\])/cg or m/\G($LinkPattern)/cg)) {
$sub_id = $1;
} elsif ($FreeLinks
&& (($BracketWiki
- && m/\G(\[\[($FreeLinkPattern)\|([^\]]+)\]\])/cog)
- or m/\G(\[\[\[($FreeLinkPattern)\]\]\])/cog
- or m/\G(\[\[($FreeLinkPattern)\]\])/cog)) {
+ && m/\G(\[\[($FreeLinkPattern)\|([^\]]+)\]\])/cg)
+ or m/\G(\[\[\[($FreeLinkPattern)\]\]\])/cg
+ or m/\G(\[\[($FreeLinkPattern)\]\])/cg)) {
$sub_id = $2;
}
diff --git a/modules/org-mode.pl b/modules/org-mode.pl
index ad9df72f..82ca3a52 100644
--- a/modules/org-mode.pl
+++ b/modules/org-mode.pl
@@ -27,7 +27,7 @@ my $org_emph_re = qr!\G([ \t('\"])*(([*/_=+])([^ \t\r\n,*/_=+].*?(?:\n.*?){0,1}[
my %org_emphasis_alist = qw!* b / i _ u = code + del!;
sub OrgModeRule {
- if (/$org_emph_re/cgo) {
+ if (/$org_emph_re/cg) {
my $tag = $org_emphasis_alist{$3};
return "$1<$tag>$4$tag>$5";
}
diff --git a/modules/paragraph-link.pl b/modules/paragraph-link.pl
index 6fa44fa6..d6a4ee62 100644
--- a/modules/paragraph-link.pl
+++ b/modules/paragraph-link.pl
@@ -28,7 +28,7 @@ push(@MyRules, \&ParagraphLinkRule);
$RuleOrder{\&ParagraphLinkRule} = 100;
sub ParagraphLinkRule {
- if ($bol && m/\G(\[(-)?$FreeLinkPattern\])/cog) {
+ if ($bol && m/\G(\[(-)?$FreeLinkPattern\])/cg) {
Dirty($1);
my $invisible = $2;
my $orig = $3;
diff --git a/modules/partial-journal.pl b/modules/partial-journal.pl
index 5e881ef2..031b061d 100644
--- a/modules/partial-journal.pl
+++ b/modules/partial-journal.pl
@@ -27,7 +27,7 @@ our ($q, %Page, @MyRules, $CommentsPrefix);
push(@MyRules, \&PartialCutRule);
sub PartialCutRule {
- if (m/\G(?<=\n)\s*--\s*cut\s*--\s*(?=\n)/gc) {
+ if (m/\G(?<=\n)\s*--\s*cut\s*--\s*(?=\n)/cg) {
return CloseHtmlEnvironments() . '