Bug 22124: Update cataloguing plugin system to not generate type parameter in script tag
authorJosef Moravec <josef.moravec@gmail.com>
Mon, 14 Jan 2019 09:16:53 +0000 (09:16 +0000)
committerJesse Maseto <jesse@bywatersolutions.com>
Wed, 6 Feb 2019 17:57:24 +0000 (17:57 +0000)
Test plan:
1) Apply the patch
2) Have defined some cataloguing plugin which generates javascript - for
example dateaccessioned.pl
3) Go to cataloguing/adding item and show source
-> there should be no type parameter in script tag in code added by
cataloguing pulgin
4) prove t/db_dependent/FrameworkPlugin.t

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cadb7eaab2c9617551450f84acadff0d48a846b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b27150cf9a4c62a636ed7d158e1fe44941de189b)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

Koha/FrameworkPlugin.pm

index 2d7390f..418c0a3 100644 (file)
@@ -376,8 +376,7 @@ sub _merge_script {
     my ( $id, $script, $bind ) = @_;
     chomp ($script, $bind);
     return <<HERE;
-<script type="text/javascript">
-//<![CDATA[
+<script>
 $script
 function BindEvents$id() {
 $bind
@@ -385,7 +384,6 @@ $bind
 \$(document).ready(function() {
     BindEvents$id();
 });
-//]]>
 </script>
 HERE
 }