File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
app/code/Magento/GoogleAdwords/view/frontend/templates
dev/tests/static/testsuite/Magento/Test/Legacy Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 18
18
var google_conversion_value = <?php echo $ block ->getHelper ()->getConversionValue () ?> ;
19
19
/* ]]> */
20
20
</script>
21
- <script type="text/javascript" src="<?php echo $ block ->getHelper ()->getConversionJsSrc ()?> "></script>
21
+ <script src="<?php echo $ block ->getHelper ()->getConversionJsSrc ()?> "></script>
22
22
<noscript>
23
23
<div style="display:inline;">
24
24
<img height="1" width="1" style="border-style:none;" alt=""
Original file line number Diff line number Diff line change @@ -56,4 +56,25 @@ function ($file) {
56
56
\Magento \Framework \Test \Utility \Files::init ()->getPhtmlFiles ()
57
57
);
58
58
}
59
+
60
+ public function testObsoleteJavascriptAttributeType ()
61
+ {
62
+ $ invoker = new \Magento \Framework \Test \Utility \AggregateInvoker ($ this );
63
+ $ invoker (
64
+ /**
65
+ * "text/javascript" type attribute in not obligatory to use in templates due to HTML5 standards.
66
+ * For more details please go to "http://www.w3.org/TR/html5/scripting-1.html".
67
+ *
68
+ * @param string $file
69
+ */
70
+ function ($ file ) {
71
+ $ this ->assertNotRegexp (
72
+ '/type="text\/javascript"/ ' ,
73
+ file_get_contents ($ file ),
74
+ 'Please do not use "text/javascript" type attribute. '
75
+ );
76
+ },
77
+ \Magento \Framework \Test \Utility \Files::init ()->getPhtmlFiles ()
78
+ );
79
+ }
59
80
}
You can’t perform that action at this time.
0 commit comments