[Bug 25428] New: Escaped HTML shows in authority detail view when subfield is a link
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 Bug ID: 25428 Summary: Escaped HTML shows in authority detail view when subfield is a link Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: MARC Authority data support Assignee: koha-bugs@lists.koha-community.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org Created attachment 104604 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104604&action=edit Screenshot showing the problem In authority records there is the option to designate a subfield as a URL (like we do for 856$u in the default MARC framework). When you view the details of such a record the URL is output to the screen as HTML markup. This is because the script is sending hard-coded HTML to the template and the template outputs is as escaped. Rather than use the $raw filter to make the link work, we should remove the script-generated HTML and do it in the template. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 104605 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104605&action=edit Bug 25428: Correctly encode link if authority subfield is a URL This patch modifies the script and template for showing the details of an authority record so that if the authority subfield is configured to be a link the link is correctly output in the template. To test you must have an authority type configured with at least one subfield designated as a URL: - Go to Administration -> Authority types - Select "MARC structure" from the actions menu for the authority type you want to modify. - Select "Subfields" from the actions menu for the tag containing the subfield you want to modify (for instance 856). - Edit the subfield you want to display as a link (e.g. subfield u). - In the subfield configuration form under "Advanced constraints" check the "Is a URL" checkbox and save your changes. - Apply the patch and go to Authorities in the staff interface. - Search for or create an authority record which contains URL information in the right subfield (for instance 856$u). - View the details for the record. Using the 856 example, the "8" tab should contain an active link pointing to the correct URL. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104605|0 |1 is obsolete| | --- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 104967 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104967&action=edit Bug 25428: Correctly encode link if authority subfield is a URL This patch modifies the script and template for showing the details of an authority record so that if the authority subfield is configured to be a link the link is correctly output in the template. To test you must have an authority type configured with at least one subfield designated as a URL: - Go to Administration -> Authority types - Select "MARC structure" from the actions menu for the authority type you want to modify. - Select "Subfields" from the actions menu for the tag containing the subfield you want to modify (for instance 856). - Edit the subfield you want to display as a link (e.g. subfield u). - In the subfield configuration form under "Advanced constraints" check the "Is a URL" checkbox and save your changes. - Apply the patch and go to Authorities in the staff interface. - Search for or create an authority record which contains URL information in the right subfield (for instance 856$u). - View the details for the record. Using the 856 example, the "8" tab should contain an active link pointing to the correct URL. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described, no errors -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104967|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 105200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105200&action=edit Bug 25428: Correctly encode link if authority subfield is a URL This patch modifies the script and template for showing the details of an authority record so that if the authority subfield is configured to be a link the link is correctly output in the template. To test you must have an authority type configured with at least one subfield designated as a URL: - Go to Administration -> Authority types - Select "MARC structure" from the actions menu for the authority type you want to modify. - Select "Subfields" from the actions menu for the tag containing the subfield you want to modify (for instance 856). - Edit the subfield you want to display as a link (e.g. subfield u). - In the subfield configuration form under "Advanced constraints" check the "Is a URL" checkbox and save your changes. - Apply the patch and go to Authorities in the staff interface. - Search for or create an authority record which contains URL information in the right subfield (for instance 856$u). - View the details for the record. Using the 856 example, the "8" tab should contain an active link pointing to the correct URL. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described, no errors Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05.00 |20.05.00, 19.11.07 released in| | CC| |aleisha@catalyst.net.nz Status|Pushed to master |Pushed to stable --- Comment #5 from Aleisha Amohia <aleisha@catalyst.net.nz> --- backported to 19.11.x for 19.11.07 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25428 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |Pushed to oldoldstable Version(s)|20.05.00, 19.11.07 |20.05.00, 19.11.07, released in| |19.05.12 --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported to 19.05.x branch for 19.05.12 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org