Created attachment 2686 [details] [review] Simple patch (only for '<'). In C4/XSLT.pm itemcallnumber is concatenated with other data to create an XML document. Currently, only ampersand is encoded in corresponding XML entity (&). If itemcallnumber contain '<' then the XML parser, reading the XML document, can not understand the document, because it interprets this part of itemcallnumber data ('<') as the beginning of an XML tag. In this case (one bibliography with '<' in itemcallnumber) search in Koha does not function (return no results given the XML parsing bug).
Created attachment 2687 [details] [review] Complete patch (for all XML special characters except ampersand)
Submitted revised patch for inclusion in HEAD.
Created attachment 2702 [details] [review] revised patch; defines new C4::Koha::xml_escape
I have tested changes for the files C4/Koha.pm and C4/XSLT.pm without problems. It has good behaviour even on data containing '<'. This patch is vastly better than mine. Thank you very much for the clean refactoring.%0
Pushed to branch new/bug_5301 Please test and let me know and I will merge to master.
> Pushed to branch new/bug_5301 > > Please test and let me know and I will merge to master. I have tested branch new/bug_5301. Koha's behaviour is good, even on data containing '<'. Thanks.
Pushed to master, please close if still working fine
This bug has a patch presently committed to HEAD and 3.2.x. Please take the appropriate action to update the status of this bug. Remember, bugs which have been resolved should be tested and marked closed, preferably by the original reporter.