User tests: Successful: Unsuccessful:
Pull Request for Improvement.
This PR improves inline js/css rendering in HTML5.
In HTML5 there are default type for:
script tag: text/javascript
style tag: text/css
So they are not needing when the document is rendered in HTML5.
Joomla already removes them in HTML5 for external js/css files, but not for inline js/css.
This PR improves that.
<script type="text/javascript">[...]</script><script>[...]</script>To test the style tag you can add to your protostar index.php file, for instance:
$doc->addStyleDeclaration('p {margin:0}');That should be rendered, after the patch. as
<style>
p {margin:0}
</style>Also check code difference.
| Status | New | ⇒ | Pending | 
| Labels | Added: 
? | ||
 
                | Category | ⇒ | Code style | 
 
                In protostar this block is rendered unchanged:
        <style type="text/css">
            h1,h2,h3,h4,h5,h6,.site-title{
                font-family: 'Open Sans', sans-serif;
            }
        </style>
Also in Beez there is this unchanged block:
<script type="text/javascript">
    var big        = '72%';
    var small      = '53%';
    var bildauf    = '/joomla36/templates/beez3/images/plus.png';
    var bildzu     = '/joomla36/templates/beez3/images/minus.png';
    var rightopen  = 'Open info';
    var rightclose = 'Close info';
    var altopen    = 'is open';
    var altclose   = 'is closed';
</script>
 
                @waader that's true. That happens because someone didn't use the Joomla API to load the style and javascript.
See, for instance, https://github.com/joomla/joomla-cms/blob/staging/templates/protostar/index.php#L98-L103 for protostar.
But that as nothing to do with this PR does.
 
                I have tested this item  successfully on 20a41a8
 successfully on 20a41a8
Thanks for the explanation!
 
                @brianteeman RTC?
| Status | Pending | ⇒ | Ready to Commit | 
 
                | Labels | Added: 
? | ||
| Milestone | Added: | ||
| Status | Ready to Commit | ⇒ | Fixed in Code Base | 
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-02 06:08:03 | 
| Closed_By | ⇒ | rdeutz | 
| Labels | Removed: 
? | ||
I have tested this item successfully on 20a41a8
 successfully on 20a41a8
Tested script and style tag on protostar, both working als described.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9843.