Changeset 42861
- Timestamp:
- 03/20/2018 09:36:04 PM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-includes/kses.php
r40950 r42861 828 828 829 829 // Are any attributes allowed at all for this element? 830 if ( ! isset( $allowed_html[ strtolower( $element ) ] ) || true === $allowed_html[ strtolower( $element ) ] || count( $allowed_html[ strtolower( $element ) ] ) == 0 ) { 830 $element_low = strtolower( $element ); 831 if ( empty( $allowed_html[ $element_low ] ) || true === $allowed_html[ $element_low ] ) { 831 832 return "<$element$xhtml_slash>"; 832 833 } -
branches/4.9/tests/phpunit/tests/kses.php
r40637 r42861 709 709 $this->assertEquals( "<{$element} title=\"foo\">", wp_kses_attr( $element, $attribute, array( 'foo' => array( 'title' => true ) ), array() ) ); 710 710 } 711 712 /** 713 * @ticket 43312 714 */ 715 function test_wp_kses_attr_no_attributes_allowed_with_false() { 716 $element = 'foo'; 717 $attribute = 'title="foo" class="bar"'; 718 719 $this->assertEquals( "<{$element}>", wp_kses_attr( $element, $attribute, array( 'foo' => false ), array() ) ); 720 } 711 721 }
Note: See TracChangeset
for help on using the changeset viewer.