Changeset 42860
- Timestamp:
- 03/20/2018 09:34:15 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/kses.php
r42712 r42860 1048 1048 1049 1049 // Are any attributes allowed at all for this element? 1050 if ( ! isset( $allowed_html[ strtolower( $element ) ] ) || true === $allowed_html[ strtolower( $element ) ] || count( $allowed_html[ strtolower( $element ) ] ) == 0 ) { 1050 $element_low = strtolower( $element ); 1051 if ( empty( $allowed_html[ $element_low ] ) || true === $allowed_html[ $element_low ] ) { 1051 1052 return "<$element$xhtml_slash>"; 1052 1053 } -
trunk/tests/phpunit/tests/kses.php
r42343 r42860 723 723 $this->assertEquals( "<{$element} title=\"foo\">", wp_kses_attr( $element, $attribute, array( 'foo' => array( 'title' => true ) ), array() ) ); 724 724 } 725 726 /** 727 * @ticket 43312 728 */ 729 function test_wp_kses_attr_no_attributes_allowed_with_false() { 730 $element = 'foo'; 731 $attribute = 'title="foo" class="bar"'; 732 733 $this->assertEquals( "<{$element}>", wp_kses_attr( $element, $attribute, array( 'foo' => false ), array() ) ); 734 } 725 735 }
Note: See TracChangeset
for help on using the changeset viewer.