Skip to content

Commit

Permalink
Newer perl versions require that { in regexps be escaped 00~hs://gith…
Browse files Browse the repository at this point in the history
…ub.com//issues/933#i33
  • Loading branch information
jcameron committed Jul 4, 2018
1 parent b776fad commit dbe8bfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webmin-search-lib.pl
Expand Up @@ -285,13 +285,13 @@ sub cgi_page_title
local ($m, $cgi) = @_;
local $data = &read_file_contents(&module_root_directory($m)."/".$cgi);
local $rv;
if ($data =~ /(ui_print_header|ui_print_unbuffered_header)\([^,]+,[^,]*(\$text{'([^']+)'|\$text{"([^"]+)"|\&text\('([^']+)'|\&text\("([^"]+)")/) {
if ($data =~ /(ui_print_header|ui_print_unbuffered_header)\([^,]+,[^,]*(\$text\{'([^']+)'|\$text\{"([^"]+)"|\&text\('([^']+)'|\&text\("([^"]+)")/) {
# New header function, with arg before title
local $msg = $3 || $4 || $5 || $6;
local %mtext = &load_language($m);
$rv = $mtext{$msg};
}
elsif ($data =~ /(^|\s|mail_page_)header\(\s*(\$text{'([^']+)'|\$text{"([^"]+)"|\&text\('([^']+)'|\&text\("([^"]+)")/) {
elsif ($data =~ /(^|\s|mail_page_)header\(\s*(\$text\{'([^']+)'|\$text\{"([^"]+)"|\&text\('([^']+)'|\&text\("([^"]+)")/) {
# Old header function
local $msg = $3 || $4 || $5 || $6;
local %mtext = &load_language($m);
Expand Down

2 comments on commit dbe8bfb

@iliajie
Copy link
Collaborator

@iliajie iliajie commented on dbe8bfb Jul 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as expected. Finally fixed. Thanks.

@okdotnz
Copy link

@okdotnz okdotnz commented on dbe8bfb Jul 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working great. Thank you.

Please sign in to comment.