whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Allow for possible meta-chars
Date Fri, 19 Feb 2021 15:54:55 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new e79a0db  Allow for possible meta-chars
e79a0db is described below

commit e79a0db8dd1ec248c11431d7a067a9bc131777fa
Author: Sebb <sebb@apache.org>
AuthorDate: Fri Feb 19 15:54:46 2021 +0000

    Allow for possible meta-chars
---
 www/members/nominations.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
index b1b9165..1d13603 100755
--- a/www/members/nominations.cgi
+++ b/www/members/nominations.cgi
@@ -91,7 +91,7 @@ _html do
           _ul nominations.sort_by {|nominee| nominee[:name]} do |nominee|
             _li! do
               person = ASF::Person.find(nominee[:id])
-              match = /\b(#{nominee[:name]}|#{person.public_name})\b/i
+              match = /\b(#{Regexp.escape(nominee[:name])}|#{Regexp.escape(person.public_name)})\b/i
 
               if emails.any? {|mail| mail.subject.downcase =~ match}
                 _a.present person.public_name, href: "#{ROSTER}/#{nominee[:id]}"


Mime
View raw message