[Bug 27165] New: Online Resource link displays as HTML in OPAC MARC view
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27165 Bug ID: 27165 Summary: Online Resource link displays as HTML in OPAC MARC view Change sponsored?: --- Product: Koha Version: 20.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: jyorio@equinoxinitiative.org QA Contact: testopia@bugs.koha-community.org Happens in both 20.05 and 19.11: In the OPAC, when using MARC view for a record with an online resource link, the complete HTML for the link is displayed for the URI. That is, if the URI is: http://some.valid.link, the MARC preview shows: <a href="http://some.valid.link">http://some.valid.link</a> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27165 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- How was the link catalogued in this case? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27165 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- I can confirm this in master too. Testing with a record that has 856u populated with a regular link, the MARC view shows HTML. An example from our catalog, currently at v19.11.08: https://search.myacpl.org/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=23952... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27165 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- opac-MARCdetail.pl checks whether a subfield should be a link, and outputs HTML if it is. The template assumes that the subfield value *doesn't* contain HTML and uses the "html" filter on the variable. The template needs a check on whether the subfield is a link in order to selectively use the "$raw" filter. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27165 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|20.05 |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27165 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bibliothek@th-wildau.de --- Comment #4 from Jan Kissig <bibliothek@th-wildau.de> --- I'd suggest the same logic as in catalogue/MARCdetail.pl where an 'is_url' flag is passed to the template and the template will surround the content with an html anchor tag if that flag is found. As for URLs missing the http(s):// surrounding them with <a> will generate incorrect links, see pending https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6892 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org