Bug 7554: Clean newlines in browse script

Records with a newline in the title will break the Javascript search pagination
on the OPAC without this patch.

To test:
1. Import a record with a newline in the title (an example is attached to this
   bug)
2. Do a search that turns up the record and at least one other
3. View the detail page for one of the other records
4. Observe that there is a javascript error
5. Apply patch
6. Repeat search
7. Observe that there is no javascript error

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Simple template change, works well

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Jared Camins-Esakov 2012-02-17 12:50:47 -05:00 committed by Paul Poulain
parent 803095a798
commit 853676b2e3
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@
var pag_index_ini = [% indexPag %];
[% IF ( listResults ) %]
[% FOREACH listResult IN listResults %]
arrPagination[[% listResult.index %]] = {url:"[% listResult.url %]", title:"[% listResult.title|html %]", author:"[% listResult.author|html %]", biblionumber:[% listResult.biblionumber %]};
arrPagination[[% listResult.index %]] = {url:"[% listResult.url %]", title:"[% listResult.title|remove('\n')|html %]", author:"[% listResult.author|html %]", biblionumber:[% listResult.biblionumber %]};
[% END %]
[% END %]
[% END %]