File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,10 @@ private function findSpecialAnnotation($stackPtr)
151
151
$ startOfStatement = $ this ->file ->findPrevious (T_OPEN_TAG , $ stackPtr );
152
152
return $ this ->file ->findPrevious (T_COMMENT , $ stackPtr , $ startOfStatement );
153
153
}
154
+ if ($ this ->tokens [$ stackPtr ]['code ' ] === T_OPEN_TAG_WITH_ECHO ) {
155
+ $ endOfStatement = $ this ->file ->findNext (T_CLOSE_TAG , $ stackPtr );
156
+ return $ this ->file ->findNext (T_COMMENT , $ stackPtr , $ endOfStatement );
157
+ }
154
158
return false ;
155
159
}
156
160
Original file line number Diff line number Diff line change 1
1
<!--unsafe-->
2
- <?php /* @noEscape */ echo $ code ; ?>
2
+
3
3
<?php $ block ->getSomeData (); echo $ block ->getSomeData (); /* @escapeNotVerified */ echo $ block ->getSomeData ();?>
4
4
<?= $ block ->getTitle ();?>
5
5
<?php echo $ object ->getSomeMethod ($ block ->getHtmlId ());?>
@@ -56,3 +56,4 @@ echo $var;
56
56
<?php echo $ block ->escapeJs ($ js ); ?>
57
57
<?php echo $ block ->escapeCss ($ css ); ?>
58
58
<?php echo $ block ->getJsLayout ($ jsLayout ); ?>
59
+ <?= /* @noEscape */ json_encode ($ config ) ?>
Original file line number Diff line number Diff line change 60
60
<severity >10</severity >
61
61
<type >error</type >
62
62
<exclude-pattern >*/lib/*</exclude-pattern >
63
+ <exclude-pattern >*/Test/*</exclude-pattern >
63
64
</rule >
64
65
<rule ref =" Magento2.Strings.ExecutableRegEx" >
65
66
<severity >10</severity >
97
98
<severity >9</severity >
98
99
<type >warning</type >
99
100
<exclude-pattern >*/lib/*</exclude-pattern >
101
+ <exclude-pattern >*/Test/*</exclude-pattern >
100
102
</rule >
101
103
<rule ref =" Magento2.Security.XssTemplate" >
102
104
<include-pattern >*.phtml</include-pattern >
252
254
<rule ref =" Squiz.PHP.GlobalKeyword" >
253
255
<severity >7</severity >
254
256
<type >warning</type >
257
+ <exclude-pattern >*/Test/*</exclude-pattern >
255
258
</rule >
256
259
<rule ref =" Squiz.Scope.MemberVarScope" >
257
260
<severity >7</severity >
You can’t perform that action at this time.
0 commit comments