Bug 9113 - batch modification removes +
Summary: batch modification removes +
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 13:13 UTC by Nicole C. Engard
Modified: 2014-12-07 20:03 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed patch (1.92 KB, patch)
2013-06-26 16:00 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 9113 - batch modification removes + (1.97 KB, patch)
2013-06-30 04:38 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 9113 - batch modification removes + (2.01 KB, patch)
2013-07-05 13:04 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2012-11-20 13:13:51 UTC
If you're using the batch modification tool and entering a call number like 

E+ 123 ABC 

The tool removes the + and puts a space in it's place

E  123 ABC
Comment 1 Nicole C. Engard 2012-11-20 13:14:02 UTC
This is in Master and 3.8
Comment 3 Fridolin Somers 2013-06-26 16:00:50 UTC Comment hidden (obsolete)
Comment 4 Chris Cormack 2013-06-30 04:38:43 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2013-07-05 13:04:12 UTC
Created attachment 19407 [details] [review]
Bug 9113 - batch modification removes +

If you're using the batch modification tool and entering a call number like "E+ 123 ABC", the tool removes the + and puts a space in it's place "E  123 ABC"

This is because form is posted via Ajax by background-job-progressbar.js.
Values are URI-encoded using escape() javascript but this method does not escape some caracters : * @ - _ + . /
And a + is considered as a space in a URI.

This patch replaces escape() by encodeURIComponent() which encodes every character.

Test plan :
Perform an items batch modification by setting '* @ - _ + . /' in a field (notes for example) and see that all caracters are well saved.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Galen Charlton 2013-07-05 15:43:18 UTC
Pushed to master.  Thanks, Fridolyn!
Comment 7 Tomás Cohen Arazi 2013-07-15 23:45:56 UTC
This patch has been pushed to 3.12.x, will be in 3.12.2.

Thanks Fridolyn!
Comment 8 Bernardo Gonzalez Kriegel 2013-08-03 20:09:41 UTC
Pushed to 3.10.x, will be in 3.10.10
Comment 9 Chris Hall 2013-08-18 04:27:01 UTC
Pushed to 3.8.x, will be in 3.8.17