If you have a record, that contains < >, those are incorrectly escaped on the OPAC and staff XSLT result lists. The detail pages display correctly. Example: Record: Wer ist wer? <TEST> Display: Wer ist wer? <TEST> HTML source: &lt;TEST&gt It looks like a problem with the sequence of escaping characters. First < > are changed to HTML entities, then the apersand itself is changed, leaving us with a mix. This was reported by one of our librares and seems to have changed between 3.6 and 3.12 as they were recently updated. The problem doesn't seem to appear on master. I couldn't test with 3.14 so far.
Hm, thinking more about it - I think it could also be a configuration/indexing problem. Needs more testing.
Ok, it's not related to the version actually - it's related to indexing: rebuild_zebra.pl -x = broken display rebuild_zebra.pl without -x = display ok -x is the default on package installations.
Created attachment 25199 [details] [review] Bug 11741: Correct display of < > in XSLT result lists < and > are incorrectly transformed into HTML entities on the XSLT result list. Example: Record: <TEST> Result list: <TEST> HTML source: &lt;TEST&gt To test: - catalog a record that contains > and < - Reindex, without using the -x option - Confirm the display is correct - Reindex again, using the -x option - Confirm the display is now broken - Apply patch - Reindex again with and without -x - Verify that now the display is always correct
I found a way to fix the display, but I am not totally persuaded this is a good solution - please comment :)
I think the patch is good, but I can't duplicate. I added a record from z39.50, but tweaked the title to have >TEST< I then did: ./misc/migration_tools/rebuild_zebra.pl -b -a -r -x -v Then realized OOPS! 3.14.x not master. git checkout -b bug_11741 origin/3.14.x And then I tried to browse for the record https://demo.library.kohasystem.ca/cgi-bin/koha/opac-detail.pl?biblionumber=... And everything displayed nicely. I then thought, "Oh wait! XSLT junk!" So, I changed the OPACXSLTDetailsDisplay and OPACXSLTResultsDisplay to default. And retried. Still looked okay.
I think Tomas tried to dig out the real problem, maybe he has an idea why reproducing the problem proved difficult?
(In reply to M. Tompsett from comment #5) > I think the patch is good, but I can't duplicate. You need to be in a GRS-1 setup to reproduce.
Created attachment 25617 [details] [review] Bug 11741: Correct display of < > in XSLT result lists < and > are incorrectly transformed into HTML entities on the XSLT result list. Example: Record: <TEST> Result list: <TEST> HTML source: &lt;TEST&gt To test: - catalog a record that contains > and < - Reindex, without using the -x option - Confirm the display is correct - Reindex again, using the -x option - Confirm the display is now broken - Apply patch - Reindex again with and without -x - Verify that now the display is always correct Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Note: the problem is only visible in GRS-1 setup. It works as expected. No behaviour change in DOM. I belive we shouldn't be (de)escaping data ad-hoc, but it seems that GRS-1 needs it because it doesn't handle HTML entities properly. This fix is OK for GRS-1, unneeded for DOM and probably any other modern search engine.
Created attachment 26106 [details] [review] [PASSED QA] Bug 11741: Correct display of < > in XSLT result lists < and > are incorrectly transformed into HTML entities on the XSLT result list. Example: Record: <TEST> Result list: <TEST> HTML source: &lt;TEST&gt To test: - catalog a record that contains > and < - Reindex, without using the -x option - Confirm the display is correct - Reindex again, using the -x option - Confirm the display is now broken - Apply patch - Reindex again with and without -x - Verify that now the display is always correct Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Note: the problem is only visible in GRS-1 setup. It works as expected. No behaviour change in DOM. I belive we shouldn't be (de)escaping data ad-hoc, but it seems that GRS-1 needs it because it doesn't handle HTML entities properly. This fix is OK for GRS-1, unneeded for DOM and probably any other modern search engine. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pushed to master. Thanks, Katrin!