Changeset 48572
- Timestamp:
- 07/23/2020 12:42:48 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/kses.php
r48478 r48572 231 231 'height' => true, 232 232 'hspace' => true, 233 'loading' => true, 233 234 'longdesc' => true, 234 235 'vspace' => true, -
trunk/tests/phpunit/tests/kses.php
r48221 r48572 768 768 array( 769 769 'img', 770 'loading="lazy"', 771 'loading="lazy"', 772 ), 773 array( 774 'img', 770 775 'onerror=alert(1)', 771 776 '', … … 1353 1358 ); 1354 1359 } 1360 1361 /** 1362 * Test filtering a standard img tag. 1363 * 1364 * @ticket 50731 1365 */ 1366 function test_wp_kses_img_tag_standard_attributes() { 1367 $html = array( 1368 '<img', 1369 'loading="lazy"', 1370 'src="https://example.com/img.jpg"', 1371 'width="1000"', 1372 'height="1000"', 1373 'alt=""', 1374 'class="wp-image-1000"', 1375 '/>', 1376 ); 1377 1378 $html = implode( ' ', $html ); 1379 1380 $this->assertSame( $html, wp_kses_post( $html ) ); 1381 } 1355 1382 }
Note: See TracChangeset
for help on using the changeset viewer.