Summary: | Garbled content of MARC control fields in MARC view | ||
---|---|---|---|
Product: | Koha | Reporter: | Michael Kuhn <mik> |
Component: | OPAC | Assignee: | Bugs List <koha-bugs> |
Status: | Failed QA --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: | Bug 22572: Display multiple spaces in MARC view |
Description
Michael Kuhn
2019-03-24 21:04:34 UTC
I'm thinking we could do something like this in the template: [% subfiel.marc_value | replace(' ', ' ') | $raw %] ...which would convert spaces to for ALL output of MARC data, on the assumption that it doesn't hurt to do so with fields which don't rely on character position. I don't think there's a good way to change the style of the output of just those fields, since there's nothing in the framework which specifies that those tags are "positionally defined." Created attachment 89364 [details] [review] Bug 22572: Display multiple spaces in MARC view I think this patch is the way to go as it HTML filters *then* replace the space with , making sure the value will be correctly escaped. We certainly will need to apply this change to other places. Should this be 'needs signoff'? No, the fix needs to be confirmed, then apply to other places (regarding my last comment). We don't know which fields this should apply to, but we know from the standard which 00x are position controlled. I believe this information is used in other places in our code too (slightly different for UNIMARC and MARC21). We could use this to only replace the spaces for the controlled fields to limit the range of this change. The will mean that the content can no longer 'break' on spaces for display, so limiting the effect to where needed would be good I think. |