[Bug 1385] New: Missing quotation marks in form values breaks things
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1385 Summary: Missing quotation marks in form values breaks things Product: Koha Version: branch 2.2 Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P3 Component: Templates AssignedTo: oleonard@athenscounty.lib.oh.us ReportedBy: dswhite42@spambob.com QAContact: koha-bugs@nongnu.org Testbed: a Gentoo Linux (kernel 2.6.20) server running Apache 2.0.59 and MySQL 5.0.40. Running Koha 2.2.9 with "npl" template for Intranet. (The probably below does not occur with the "default" Intranet template) To reproduce: Go to Cataloging -> Add MARC. Go to tag 245a and enter a title (let's say, Horton Hatches the Egg), then click the z39.50 Search button. Confirm the server to use (mine is z3950.loc.gov), then click "Search internet". Receive back an "500 Internal Server Error". The root cause: looking at the source of the small popup window that has the z39.50 server name and the "Search internet" button, I see this code: ---------------- <input type="hidden" name="op" id="op" value="do_search" /> <input type="hidden" name="title" value=Horton Hatches the Egg /> <input type="hidden" name="author" value= /> <input type="hidden" name="isbn" value= /> <input type="hidden" name="issn" value= /> <input type="hidden" name="" value="0" /> ---------------- Note that the values for "title", "author", "isbn" and "issn" are not encapsulated in quotation marks. This means that the "title" field will contain an undefined value (probably just "Horton"), and the author, isbn and issn fields will all contain the value "/".) This breaks the search script. Solution: The immediate solution is to add the quotation marks to <KOHADIR>/intranet/htdocs/intranet-tmpl/npl/en/z3950/searchresult.tmpl . However, grep'ing through the code, I found a lot of template files with similar missing quotation marks around the field values. Maybe it's fine elsewhere, but maybe it's causing random bugs on other pages. It'd be good to fix them all. I'll attach a couple of patch documents. They fix all the missing quotation marks that I could find in any .tmpl file within the Koha source. One file is for the 2.2.9 tree, the other is for the CVS tree. (the problem also occurs in several .po and .pot files, but I didn't know what they were so I wasn't comfortable messing with them). Thanks. ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
participants (1)
-
bugzilla-daemon@pippin.metavore.com