[Koha-bugs] [Bug 14691] Can't delete patron with ' character in cardnumber

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 24 03:10:00 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14691

--- Comment #14 from David Cook <dcook at prosentient.com.au> ---
Created attachment 41803
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41803&action=edit
Bug 14691 - [Alternate] Can't delete patron with ' character in cardnumber

This patch adds a new Template Toolkit plugin. To use it, simple add
[% USE EscapeURI %] at the top of the template, and then use "escape_uri"
just as you would with the normal "uri" filter (e.g. "[% variable | escape_uri
%]".

It is based on the code from version 2.26 of Template::Filter::uri_filter(),
but with a fix for the RFC3986 reserved character definition.

In versions prior to 2.26, single quotes weren't escapes, which causes
problems when trying to use the uri filter for text containing
single quotes within a single quoted string, as observed in some
Javascript for deleting patrons.

Test plan:

1. Create patron account with cardnumber sss'ssssssss and save the account.
2. Try to delete the account. Nothing happens.
3. Apply the patch, refresh the page.
4. Try to delete the account; note the Delete pop-up message that now appears;
note
that the patron gets deleted if you click OK.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list