Changeset 46907 for branches/5.1/tests/phpunit/tests/kses.php
- Timestamp:
- 12/12/2019 06:36:20 PM (5 years ago)
- Location:
- branches/5.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.1
- Property svn:mergeinfo changed
/trunk merged: 46893-46896
- Property svn:mergeinfo changed
-
branches/5.1/tests/phpunit/tests/kses.php
r46002 r46907 179 179 } 180 180 181 $bad_not_normalized = array( 182 'dummy:alert(1)', 183 'javascript:alert(1)', 184 'javascript&CoLon;alert(1)', 185 'javascript:alert(1);', 186 'javascript:alert(1);', 187 'javascript:alert(1);', 188 'javascript:alert(1);', 189 'jav ascript:alert(1);', 190 'javascript:javascript:alert(1);', 191 'javascript:javascript:alert(1);', 192 'javascript:javascript:alert(1);', 193 'javascript:javascript:alert(1);', 194 'javascript:alert(1)', 195 ); 196 foreach ( $bad_not_normalized as $k => $x ) { 197 $result = wp_kses_bad_protocol( $x, wp_allowed_protocols() ); 198 if ( ! empty( $result ) && 'alert(1);' !== $result && 'alert(1)' !== $result ) { 199 $this->fail( "wp_kses_bad_protocol failed on $k, $x. Result: $result" ); 200 } 201 } 202 181 203 $safe = array( 182 204 'dummy:alert(1)',
Note: See TracChangeset
for help on using the changeset viewer.