Project

General

Profile

Actions

Bug #92126

closed

Still <script type="text/javascript" ... hardcoded in PageRenderer.php -> leads to validity warning

Added by Patrick Grochowy over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2020-08-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The file 'typo3/sysext/core/Classes/Page/PageRenderer.php' still contains hardcoded <script type="text/javascript">, which leads to validation warnings (validator.w3.org/nu/).

For instance, when 'spamProtectEmailAddresses' is set, the 'typo3/sysext/frontend/Classes/Http/RequestHandler.php' creates inline-js which is then wrapped into <script type="text/javascript">...</script>

Also the function 'renderAdditionalJavaScriptLibraries()' (also in 'typo3/sysext/core/Classes/Page/PageRenderer.php') has a hardcoded [...] . '" type="' . [...] which leads to a <script type="">...</script>, which also results in a validity-warning.
In the function 'renderJavaScriptFiles()' directly afterwards it was already fixed. :-)

At the monent these are just warnings, but sometimes in the future they will propably become errors, so this should be fixed.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #45512: Make the type attribute optional on script, style and link elementsClosed2013-02-15

Actions
Actions #1

Updated by Bastian Bringenberg over 3 years ago

  • Project changed from 9 to TYPO3 Core
  • Category deleted (Content)
  • TYPO3 Version set to 9
  • Corrected Project.
  • Guessed TYPO3 Version.
Actions #2

Updated by Riccardo De Contardi over 3 years ago

Still valid for 11.0.0-dev, AFAICS

steps to reproduce: add to TS Setup:

config.spamProtectEmailAddresses = 1
config.removeDefaultJS = 0

with config.removeDefaultJS = external a line like

<script src="/typo3temp/assets/js/e9e07c5ca0.js?1590448730"></script>

is generated

Actions #3

Updated by Patrick Grochowy over 3 years ago

Sorry for not filling in the correct Typo3-Version number, I didn't find it in the ticketform. The error exists at least in Version 10.4.6. And seemingly also in 9.x and 11.x, but on 10.4.6 is where it occured here in the current project.

Actions #4

Updated by Riccardo De Contardi over 3 years ago

  • Related to Bug #45512: Make the type attribute optional on script, style and link elements added
Actions #5

Updated by Riccardo De Contardi over 3 years ago

I guess this one can continue here #45512

Actions #6

Updated by Riccardo De Contardi over 3 years ago

  • Category set to Frontend
Actions #7

Updated by Christoph Runkel about 3 years ago

  • TYPO3 Version changed from 9 to 10

Still hardcoded in Typo3 10.4.12 - typo3/sysext/core/Classes/Page/PageRenderer.php line 346

   $this->inlineJavascriptWrap = [
            '<script type=" text/javascript">' . LF . '/*<![CDATA[*/' . LF,
            '/*]]>*/' . LF . '</script>' . LF
        ];

Actions #8

Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68891

Actions #9

Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68891

Actions #10

Updated by Oliver Bartsch almost 3 years ago

Hi, please have a look at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68891 which fixes the inlineJavascriptWrap. The renderAdditionalJavaScriptLibraries was already fixed in #93391.

Actions #11

Updated by Gerrit Code Review almost 3 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68891

Actions #12

Updated by Gerrit Code Review almost 3 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68891

Actions #13

Updated by Gerrit Code Review almost 3 years ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68862

Actions #14

Updated by Oliver Bartsch almost 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Gerrit Code Review almost 3 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68862

Actions #16

Updated by Oliver Bartsch almost 3 years ago

  • Status changed from Under Review to Resolved
Actions #17

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF