From fd4786202e65a9109225deaaa1aa560ead010163 Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Sun, 27 Dec 2020 21:14:37 +0300 Subject: [PATCH] Quotemeta strings --- web-lib-funcs.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index bb0b5c21d..dc0f5248c 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -210,11 +210,11 @@ if ($sorted_by && $sorted_by_sectioning_preserved) { if ( # Go to another block immediately # if new line already exists - $target =~ /($line)$join.*?(\r?\n|\r\n?)+$/m || + $target =~ /(\Q$line\E)$join.*?(\r?\n|\r\n?)+$/m || # Add new line to the last element of # the block and go to another block - $target =~ s/($line)$join(.*)/$1=$2\n/) { + $target =~ s/(\Q$line\E)$join(.*)/$1=$2\n/) { last; } }