Summary: | < > not displaying correctly in XSLT result list | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Searching | Assignee: | Katrin Fischer <katrin.fischer> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, isaacbrodsky, m.de.rooy, mtompset, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 11741: Correct display of < > in XSLT result lists
Bug 11741: Correct display of < > in XSLT result lists [PASSED QA] Bug 11741: Correct display of < > in XSLT result lists |
Description
Katrin Fischer
2014-02-11 08:31:14 UTC
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! |