Bug #92126
closed
Still <script type="text/javascript" ... hardcoded in PageRenderer.php -> leads to validity warning
Added by Patrick Grochowy about 4 years ago.
Updated over 3 years ago.
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.
- Project changed from 9 to TYPO3 Core
- Category deleted (
Content)
- TYPO3 Version set to 9
- Corrected Project.
- Guessed TYPO3 Version.
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
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.
- Related to Bug #45512: Make the type attribute optional on script, style and link elements added
I guess this one can continue here #45512
- 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
];
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Under Review
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF