?
avatar artur-stepien
artur-stepien
22 Jan 2019

Steps to reproduce the issue

Every <script> tag in the system has the type="text/javascript" attribute, just look in the source

Expected result

For a Java Script remove the type attribute

Actual result

System information (as much as possible)

Every system version

Additional comments

As the type="text/javascript" attribute is considered unnecessary in W3C validator maybe we should just remove it for those type of scripts? Why send to the browser something that isn't necessary.

avatar artur-stepien artur-stepien - open - 22 Jan 2019
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Jan 2019
avatar C-Lodder
C-Lodder - comment - 22 Jan 2019

It should be removed unless otherwise specified or $this->setHtml5(true) has been defined.

Same goes for type="text/css

avatar mbabker
mbabker - comment - 22 Jan 2019

In 3.x, Joomla core defaults to XHTML/HTML4 compliant syntax which uses the type attributes.

In 4.0, Joomla core defaults to HTML5 which omits type attributes for default types.

This behavior can be toggled with $this->setHtml5() as indicated by @C-Lodder.

Closing as this is expected API behavior.

avatar mbabker mbabker - change - 22 Jan 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-01-22 14:18:32
Closed_By mbabker
avatar mbabker mbabker - close - 22 Jan 2019

Add a Comment

Login with GitHub to post a comment