[Bug 34613] New: Remove onclick event attributes from Verovio midiplayer.js
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 Bug ID: 34613 Summary: Remove onclick event attributes from Verovio midiplayer.js Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org Content-Security-Policy isn't compatible with onclick event handlers, and generally speaking we're trying to remove event attributes from all HTML anyway. This is a third-party library from RISM, but it hasn't been updated in years, so we might need to patch this one ourselves. I'm willing to look at doing a patch and pull request for RISM but we'll see if they accept it... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- It's interesting to note that RISM doesn't appear to use the MIDI player on their own site although they do seem to use Verovio to display incipits: https://opac.rism.info/metaopac/singleHit.do?methodToCall=showHit&curPos=1&identifier=251_SOLR_SERVER_63559013 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 154767 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154767&action=edit Bug 34613: Replace onclick attributes in midiplayer.js This patch replaces the onclick attributes in midiplayer.js with Javascript click handlers. To test: 0. Apply patch 1. Clear browser cache (it may be necessary to go into the Network tab and explicitly disable cache) 2. Add 031 subfields 2gopnu to Default framework 3. Create a catalogue record with a 031 like follows: 2: pe g: G-2 o: 4/4 p: 4bB''C2bE/2F4GbB/'bB2''C4D/F2.bE/4GG2bB/4'''C2C4''bB/4bE2G4bB/4bE2.F/ n: xFCGD 4. Enable the following sysprefs: OPACShowMusicalInscripts OPACPlayMusicalInscripts 5. Go to OPAC record view and click "Play this sample" 6. Play with the "Pause/Start" and "Stop" buttons 7. If the buttons work, it means the patch worked -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20397, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22581 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- I've got an upstream pull request at https://github.com/rism-digital/midi-player/pull/32 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |oleonard@myacpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #3)
I've got an upstream pull request at https://github.com/rism-digital/midi-player/pull/32
By the way, my pull request was merged into the master branch of midi-player. So we could alternatively just pull down the latest midi-player. Both this Koha patch and that upstream patch are the exact same, although the upstream version has some other differences with our version I think... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #4)
So we could alternatively just pull down the latest midi-player. Both this Koha patch and that upstream patch are the exact same, although the upstream version has some other differences with our version I think...
It looks like mostly whitespace differences, and two other lines changed. I'll leave up to QA/RM what they'd prefer here... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- This is an easy signoff. Test plan gives you everything you need. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34709 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34709 [Bug 34709] Eliminate event handler attributes in the OPAC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154767|0 |1 is obsolete| | --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 155215 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155215&action=edit Bug 34613: Replace onclick attributes in midiplayer.js This patch replaces the onclick attributes in midiplayer.js with Javascript click handlers. To test: 0. Apply patch 1. Clear browser cache (it may be necessary to go into the Network tab and explicitly disable cache) 2. Add 031 subfields 2gopnu to Default framework 3. Create a catalogue record with a 031 like follows: 2: pe g: G-2 o: 4/4 p: 4bB''C2bE/2F4GbB/'bB2''C4D/F2.bE/4GG2bB/4'''C2C4''bB/4bE2G4bB/4bE2.F/ n: xFCGD 4. Enable the following sysprefs: OPACShowMusicalInscripts OPACPlayMusicalInscripts 5. Go to OPAC record view and click "Play this sample" 6. Play with the "Pause/Start" and "Stop" buttons 7. If the buttons work, it means the patch worked Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155215|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 155761 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155761&action=edit Bug 34613: Replace onclick attributes in midiplayer.js This patch replaces the onclick attributes in midiplayer.js with Javascript click handlers. To test: 0. Apply patch 1. Clear browser cache (it may be necessary to go into the Network tab and explicitly disable cache) 2. Add 031 subfields 2gopnu to Default framework 3. Create a catalogue record with a 031 like follows: 2: pe g: G-2 o: 4/4 p: 4bB''C2bE/2F4GbB/'bB2''C4D/F2.bE/4GG2bB/4'''C2C4''bB/4bE2G4bB/4bE2.F/ n: xFCGD 4. Enable the following sysprefs: OPACShowMusicalInscripts OPACPlayMusicalInscripts 5. Go to OPAC record view and click "Play this sample" 6. Play with the "Pause/Start" and "Stop" buttons 7. If the buttons work, it means the patch worked Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable Version(s)|23.11.00 |23.11.00,23.05.04 released in| | --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00,23.05.04 |23.11.00,23.05.04,22.11.11 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 --- Comment #11 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org