Changeset 46012 for branches/4.2/tests/phpunit/tests/kses.php
- Timestamp:
- 09/04/2019 06:31:38 PM (5 years ago)
- Location:
- branches/4.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2
-
branches/4.2/tests/phpunit/tests/kses.php
r33360 r46012 138 138 'feed:javascript:alert(1)', 139 139 'feed:javascript:feed:javascript:feed:javascript:alert(1)', 140 'javascript:alert(1)', 141 'javascript:x=1;alert(1)', 140 142 ); 141 143 foreach ( $bad as $k => $x ) { … … 147 149 $this->assertEquals( str_replace( '&', '&', $x ), $result ); 148 150 break; 149 case 22: $this->assertEquals( 'javascript&#0000058alert(1);', $result ); break; 150 case 23: $this->assertEquals( 'javascript&#0000058alert(1)//?:', $result ); break; 151 case 24: $this->assertEquals( 'feed:alert(1)', $result ); break; 152 default: $this->fail( "wp_kses_bad_protocol failed on $x. Result: $result" ); 151 case 22: 152 $this->assertEquals( 'javascript&#0000058alert(1);', $result ); 153 break; 154 case 23: 155 $this->assertEquals( 'javascript&#0000058alert(1)//?:', $result ); 156 break; 157 case 24: 158 $this->assertEquals( 'feed:alert(1)', $result ); 159 break; 160 case 26: 161 $this->assertEquals( 'javascript&#58alert(1)', $result ); 162 break; 163 case 27: 164 $this->assertEquals( 'javascript&#x3ax=1;alert(1)', $result ); 165 break; 166 default: 167 $this->fail( "wp_kses_bad_protocol failed on $k, $x. Result: $result" ); 153 168 } 154 169 }
Note: See TracChangeset
for help on using the changeset viewer.