Bugzilla – Attachment 30040 Details for
Bug 12654
Incorrect quoting in regexp in AuthoritiesMarc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-12654-Correct-incorrectly-quoted-regexp.patch (text/plain), 1.22 KB, created by
Colin Campbell
on 2014-07-24 16:21:06 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2014-07-24 16:21:06 UTC
Size:
1.22 KB
patch
obsolete
>From 922800f4ec376a8d5a9b8f371d3a3200df00fc29 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Thu, 24 Jul 2014 17:12:42 +0100 >Subject: [PATCH] Bug 12654 Correct incorrectly quoted regexp > >A compile time warning was being generated because \ does not quote >{ Replace the plethora of \ before meta and presumed meta characters >by \Q \E which gets perl to generate all the necessary escapes, we can >assume it knows its regex engine as well or better than the human >programmer >--- > C4/AuthoritiesMarc.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 95fe33a..e983159 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -853,7 +853,7 @@ sub FindDuplicateAuthority { > $op = 'and'; > } > my $query='at:'.$authtypecode.' '; >- my $filtervalues=qr([\001-\040\!\'\"\`\#\$\%\&\*\+,\-\./:;<=>\?\@\(\)\{\[\]\}_\|\~]); >+ my $filtervalues=qr([\001-\040\Q!'"`#$%&*+,-./:;<=>?@(){[}_|~\E\]]); > if ($record->field($auth_tag_to_report)) { > foreach ($record->field($auth_tag_to_report)->subfields()) { > $_->[1]=~s/$filtervalues/ /g; $query.= " $op he:\"".$_->[1]."\"" if ($_->[0]=~/[A-z]/); >-- >1.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12654
:
30040
|
30262
|
30312