[libhtml-toc-perl] 01/02: patch TocInsertor.pm to escape curly braces in strings used for constructing regular expression

Damyan Ivanov dmn at moszumanska.debian.org
Thu Jun 22 12:41:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

dmn pushed a commit to branch master
in repository libhtml-toc-perl.

commit ffc83544fdb76099de0bf11527dd8b9f68bfcef4
Author: Damyan Ivanov <dmn at debian.org>
Date:   Thu Jun 22 12:31:27 2017 +0000

    patch TocInsertor.pm to escape curly braces in strings used for constructing regular expression
    
    Closes: #826481 -- Unescaped left brace in regex is deprecated
---
 debian/patches/perl-5.26.patch | 27 +++++++++++++++++++++++++++
 debian/patches/series          |  1 +
 2 files changed, 28 insertions(+)

diff --git a/debian/patches/perl-5.26.patch b/debian/patches/perl-5.26.patch
new file mode 100644
index 0000000..6d87ede
--- /dev/null
+++ b/debian/patches/perl-5.26.patch
@@ -0,0 +1,27 @@
+Description: fix unescaped braces in regular expressions
+ they are fatal with perl 5.26.
+ Also, fix a mistyped commend, fooling perl to warn about possible operator
+ precedence
+Author: Damyan Ivanov <dmn at debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826481
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=115109
+
+--- a/TocInsertor.pm
++++ b/TocInsertor.pm
+@@ -329,6 +329,7 @@ sub _processTokenAsInsertionPoint {
+ 		# Aliases
+ 	    $tipToken		     = $tipTokens->[$i];
+ 	    $tipTokenId		     = $tipToken->[TIP_TOKEN_ID];
++            $tipTokenId =~ s/(?=[{}])/\\/g;
+ 		# Id & attributes match?
+ 	    if (
+ 		($aTokenId =~ m/$tipTokenId/) && (
+@@ -361,7 +362,7 @@ sub _processTokenAsInsertionPoint {
+ 	} # if
+     } else {
+ 	$result = 0;
+-    } // if
++    } # if
+ 	# Return value
+     return $result;
+ }  # _processTokenAsInsertionPoint()
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c753eb9
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+perl-5.26.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libhtml-toc-perl.git



More information about the Pkg-perl-cvs-commits mailing list