This patch will remove the "type" attribute from <script> tags in the following staff client include files: - intranet-tmpl\prog\en\includes\acquisitions-toolbar.inc - intranet-tmpl\prog\en\includes\additem.js.inc - intranet-tmpl\prog\en\includes\browser-strings.inc - intranet-tmpl\prog\en\includes\catalog-strings.inc - intranet-tmpl\prog\en\includes\datatables.inc - intranet-tmpl\prog\en\includes\format_price.inc - intranet-tmpl\prog\en\includes\greybox.inc
Created attachment 89950 [details] [review] Bug 22957: Remove type attribute from script tags: Staff client includes 1/2 This patch removes the "type" attribute from <script> tags in several staff client include files. Also removed: Obsolete "//<![CDATA[ //]]>" markers. This patch also makes minor indentation changes, so diff using the "-w" flag. To test, apply the patch and confirm that examples of affected pages work properly without any JavaScript errors in the browser console: - Acquisitions -> Vendor (uses acuisitions-toolbar.inc) - Acquisitions -> Vendor -> Add to basket -> From a new (empty) record (uses additem.js.inc) - Catalog -> Search results -> Bibliographic detail view. (uses browser-strings.inc, catalog-strings.inc, datatables.inc, and format_price.inc ) - Tools -> Label creator -> Manage -> Label batches -> Export batch (uses greybox.inc) Validating the HTML source of any of these pages should return no errors related to the "type" attribute.
Quick question about & vs & and HTML vs XML validation with respect to the removal of CDATA in acquisitions-toolbar.inc? Are we ever validating as XML or XHTML? If not, okay. If so, then why remove CDATA?
(In reply to M. Tompsett from comment #2) > Are we ever validating as XML or XHTML? If not, okay. If so, then why remove > CDATA? As of version 3.12 Koha uses an HTML5 doctype: https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML_Templates. HTML5 documents are not required to be well-formed XML.
Created attachment 91337 [details] [review] Bug 22957: Remove type attribute from script tags: Staff client includes 1/2 This patch removes the "type" attribute from <script> tags in several staff client include files. Also removed: Obsolete "//<![CDATA[ //]]>" markers. This patch also makes minor indentation changes, so diff using the "-w" flag. To test, apply the patch and confirm that examples of affected pages work properly without any JavaScript errors in the browser console: - Acquisitions -> Vendor (uses acuisitions-toolbar.inc) - Acquisitions -> Vendor -> Add to basket -> From a new (empty) record (uses additem.js.inc) - Catalog -> Search results -> Bibliographic detail view. (uses browser-strings.inc, catalog-strings.inc, datatables.inc, and format_price.inc ) - Tools -> Label creator -> Manage -> Label batches -> Export batch (uses greybox.inc) Validating the HTML source of any of these pages should return no errors related to the "type" attribute. Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Created attachment 91382 [details] [review] Bug 22957: Remove type attribute from script tags: Staff client includes 1/2 This patch removes the "type" attribute from <script> tags in several staff client include files. Also removed: Obsolete "//<![CDATA[ //]]>" markers. This patch also makes minor indentation changes, so diff using the "-w" flag. To test, apply the patch and confirm that examples of affected pages work properly without any JavaScript errors in the browser console: - Acquisitions -> Vendor (uses acuisitions-toolbar.inc) - Acquisitions -> Vendor -> Add to basket -> From a new (empty) record (uses additem.js.inc) - Catalog -> Search results -> Bibliographic detail view. (uses browser-strings.inc, catalog-strings.inc, datatables.inc, and format_price.inc ) - Tools -> Label creator -> Manage -> Label batches -> Export batch (uses greybox.inc) Validating the HTML source of any of these pages should return no errors related to the "type" attribute. Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.03
backported to 18.11.x for 18.11.09