Bug 13129 - HTML and JS escapes missing in unimarc_field_4XX.tt
Summary: HTML and JS escapes missing in unimarc_field_4XX.tt
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-22 15:37 UTC by Fridolin Somers
Modified: 2015-06-04 23:33 UTC (History)
2 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
Bug 13129 - HTML and JS escapes missing in unimarc_field_4XX.tt (13.85 KB, patch)
2014-10-22 15:51 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 13129 - HTML and JS escapes missing in unimarc_field_4XX.tt (13.90 KB, patch)
2014-10-25 03:42 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 13129 - HTML and JS escapes missing in unimarc_field_4XX.tt (14.16 KB, patch)
2014-10-25 12:40 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2014-10-22 15:37:35 UTC
In cataloging plugin unimarc_field_4XX.tt some template vars should be HTML or JS escaped in case they contain characters of the language.
Comment 1 Fridolin Somers 2014-10-22 15:51:19 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2014-10-25 03:42:50 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-10-25 12:40:57 UTC
Created attachment 32728 [details] [review]
[PASSED QA] Bug 13129 - HTML and JS escapes missing in unimarc_field_4XX.tt

This patch adds JS and HTML espaces are it is missing.
Replaces calls to url filter by uri filter, url filter does not espace
enough characters: http://template-toolkit.org/docs/manual/Filters.html#section_url.

Also corrects the fact the code: resul.size => resul.item('size').
Old code returns the size of the loop instead of the value of "size" field.

Test plan :
 - Use the plugin unimarc_field_4XX
 - Perform a search with a ? or &
=> Search works
 - Perform a search that returns a record with a double quote in title
 - Choose this record
=> Plugin works
 - Check the results displays well the value of biblioitems.size

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, I fixed some tabs.
Tested in a UNIMARC  installation.
Comment 4 Tomás Cohen Arazi 2014-10-28 13:54:07 UTC
Patch pushed to master.

Thanks Fridolin!