From be79afd6b16fc9dd6651152147dc8e8947c74651 Mon Sep 17 00:00:00 2001 From: phette23 Date: Fri, 14 Sep 2018 16:06:49 -0700 Subject: [PATCH] Bug 21349: Instructors with special characters in cardnumber cannot be removed from course reserves Test plan: - create an instructor with a special character in their cardnumber (e.g $, @, =_) - create a course and add them to it - edit the course, attempt to remove them - pre-patch nothing happens, post-patch their name is removed Sponsored-By: California College of the Arts --- .../intranet-tmpl/prog/en/modules/course_reserves/course.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt index e2f25b4595..c3b31f5e36 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt @@ -182,7 +182,7 @@ } function RemoveInstructor( cardnumber ) { - $( '#borrower_' + cardnumber ).remove(); + $( '#borrower_' + cardnumber.replace(/([$.:\[\],=@])/g, "\\$1") ).remove(); if ( ! $('#instructors').html() ) { $('#course_instructors').hide( 800 ); -- 2.19.0