[!!!][FEATURE] Omit type=text/javascript in HTML5 script tags 00/61300/5
authorBenni Mack <benni@typo3.org>
Mon, 15 Jul 2019 14:56:39 +0000 (16:56 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 16 Jul 2019 16:13:15 +0000 (18:13 +0200)
commit327fdc1b9d5b8dd2be8f1bfbf09ead125ad36f88
treee2632445f48f51f2cd8b5a12f7098852a965c869
parent0b0f5f1ed0b377ce14f2f5b556c4ba6b9f525397
[!!!][FEATURE] Omit type=text/javascript in HTML5 script tags

HTML5 defines that <script tags do not need "type=text/javascript"
as additional attribute.

TYPO3 Backend is fully HTML5, so all parts can be removed there.

For Frontend, when having config.doctype = html5 (or empty),
then the attributes do not get added anymore as well.

If necessary, for Frontend rendering the attribute can be
added in HTML5 by specifying
includeJS.myfile.type = text/javascript
in TypoScript.

As this modifies Frontend output, it is considered breaking.

Also see W3C specification:
https://www.w3.org/TR/html52/semantics-scripting.html#element-attrdef-script-type

Resolves: #88772
Releases: master
Change-Id: I26ca4361e84cae680eedbf6855e209a6311c33da
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61300
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
25 files changed:
typo3/sysext/adminpanel/Classes/Utility/ResourceUtility.php
typo3/sysext/backend/Classes/Controller/Wizard/EditController.php
typo3/sysext/backend/Resources/Private/Templates/NewContentElement/Main.html
typo3/sysext/backend/Resources/Public/Html/Close.html
typo3/sysext/beuser/Resources/Private/Templates/Permission/Edit.html
typo3/sysext/core/Classes/Page/PageRenderer.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-88772-JavaScriptScriptTagsOmitTypetextjavascriptInHTML5.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Page/PageRendererTest.php
typo3/sysext/extbase/Classes/Mvc/Web/Response.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/AutocompleteViewHelper.php
typo3/sysext/fluid/Resources/Private/Templates/ViewHelpers/Be/Widget/Paginate/Index.html
typo3/sysext/form/Resources/Private/Backend/Layouts/FormEditor.html
typo3/sysext/form/Resources/Private/Backend/Templates/FormManager/Index.html
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Http/RequestHandler.php
typo3/sysext/frontend/Tests/Unit/Controller/Fixtures/renderedPage.html
typo3/sysext/install/Classes/ViewHelpers/Form/TypoScriptConstantsViewHelper.php
typo3/sysext/install/Resources/Private/Templates/Installer/Init.html
typo3/sysext/install/Resources/Private/Templates/Layout/Init.html
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/redirects/Resources/Private/Partials/Pagination.html
typo3/sysext/scheduler/Classes/Task/TableGarbageCollectionAdditionalFieldProvider.php
typo3/sysext/t3editor/Resources/Private/tsref.xml
typo3/sysext/workspaces/Resources/Private/Templates/Review/Index.html