Bug 12637: UTF-8 problems when creating a patron list

Encoding problems appear when creating a patron list from the patron search results page.

Test plan:
1. Perform a patron search in the patrons module
2. Select one or more patrons
3. Choose "Add selected patrons to: [ New list ]"
4. Enter a patron list title with UTF-8 characters.
5. The list will be created with bad encoding.
6. Apply the patch and verify there is no bad encoding anymore.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Patch works fine.
Note that I - very ironically - had to remove UTF8 characters from the commit
message to apply and attach the patches with git/git-bz.
Hopefully, an upgrade to a newer git version will resolve that too.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Jonathan Druart 2014-07-24 10:51:19 +02:00 committed by Tomas Cohen Arazi
parent ba02e09e6d
commit 312bf65956

View file

@ -59,8 +59,8 @@ $(document).ready(function() {
borrowernumbers.push($(this).val());
});
var data = {
add_to_patron_list: encodeURIComponent($("#add_to_patron_list").val()),
new_patron_list: encodeURIComponent($("#new_patron_list").val()),
add_to_patron_list: $("#add_to_patron_list").val(),
new_patron_list: $("#new_patron_list").val(),
borrowernumbers: borrowernumbers
};
$.ajax({