Bug 21905

Summary: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button incorrectly filtered
Product: Koha Reporter: Kyle M Hall <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, jesse, lucas, martin.renvoize, nick
Version: unspecified   
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:
Bug Depends on: 13618, 20968    
Bug Blocks:    
Attachments: Bug 21905: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button incorrectly filtered
Bug 21905: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button incorrectly filtered

Description Kyle M Hall 2018-11-28 18:40:32 UTC
The new plugin hook intranet_catalog_biblio_enhancements_toolbar_button is rendered useless due to the outputted html being escaped using the html filter. It should be using the raw filter instead.
Comment 1 Kyle M Hall 2018-11-28 18:43:56 UTC
Created attachment 82709 [details] [review]
Bug 21905: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button incorrectly filtered

The new plugin hook intranet_catalog_biblio_enhancements_toolbar_button is rendered useless due to the outputted html being escaped using the html filter. It should be using the raw filter instead.

Test Plan:
1) Enable plugins
2) Download and install the latest version of the Kitchen Sink plugin
   https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/download/v2.1.21/koha-plugin-kitchen-sink-v2.1.21.kpz
3) Browse to catalogue/detail.pl for a record
4) Note you see the raw html of the plugin output in the toolbar
5) Apply this patch
6) Restart all the things
7) Reload the page
8) Note the html is now correctly rendered as a button
Comment 2 Andrew Isherwood 2018-11-29 08:43:13 UTC
*** Bug 21900 has been marked as a duplicate of this bug. ***
Comment 3 Fridolin Somers 2018-11-29 10:28:37 UTC
raw filter comes from Bug 13618.

In 18.05.x and 17.11.x, html filter was removed from patch of Bug 20968
Comment 4 Martin Renvoize 2018-11-29 15:46:07 UTC
Created attachment 82756 [details] [review]
Bug 21905: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button incorrectly filtered

The new plugin hook intranet_catalog_biblio_enhancements_toolbar_button is rendered useless due to the outputted html being escaped using the html filter. It should be using the raw filter instead.

Test Plan:
1) Enable plugins
2) Download and install the latest version of the Kitchen Sink plugin
   https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/download/v2.1.21/koha-plugin-kitchen-sink-v2.1.21.kpz
3) Browse to catalogue/detail.pl for a record
4) Note you see the raw html of the plugin output in the toolbar
5) Apply this patch
6) Restart all the things
7) Reload the page
8) Note the html is now correctly rendered as a button

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2018-11-29 15:46:45 UTC
Trivial patch that works as expected.. going straight to PQA.
Comment 6 Nick Clemens 2018-11-29 19:17:30 UTC
Awesome work everyone!

Pushed to master for 19.05
Comment 7 Martin Renvoize 2018-12-10 09:49:05 UTC
Pushed to 18.11.x for 18.11.01
Comment 8 Lucas Gass 2018-12-17 21:57:36 UTC
requires dependency not backporting to 18.05
Comment 9 Jesse Maseto 2018-12-19 12:03:13 UTC
Pushed to 18.05.x for 18.05.07
Comment 10 Jesse Maseto 2018-12-19 16:46:46 UTC
reverted from 18.05.x