Changeset 44156
- Timestamp:
- 12/14/2018 03:27:55 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43813
- Property svn:mergeinfo changed
-
trunk/src/wp-includes/kses.php
r44136 r44156 62 62 'address' => array(), 63 63 'a' => array( 64 'href' => true, 65 'rel' => true, 66 'rev' => true, 67 'name' => true, 68 'target' => true, 64 'href' => true, 65 'rel' => true, 66 'rev' => true, 67 'name' => true, 68 'target' => true, 69 'download' => array( 70 'valueless' => 'y', 71 ), 69 72 ), 70 73 'abbr' => array(), -
trunk/tests/phpunit/tests/kses.php
r44136 r44156 38 38 39 39 $attributes = array( 40 'class' => 'classname', 41 'id' => 'id', 42 'style' => 'color: red;', 43 'title' => 'title', 44 'href' => 'http://example.com', 45 'rel' => 'related', 46 'rev' => 'revision', 47 'name' => 'name', 48 'target' => '_blank', 40 'class' => 'classname', 41 'id' => 'id', 42 'style' => 'color: red;', 43 'title' => 'title', 44 'href' => 'http://example.com', 45 'rel' => 'related', 46 'rev' => 'revision', 47 'name' => 'name', 48 'target' => '_blank', 49 'download' => '', 49 50 ); 50 51 51 52 foreach ( $attributes as $name => $value ) { 52 $string = "<a $name='$value'>I link this</a>"; 53 $expect_string = "<a $name='" . trim( $value, ';' ) . "'>I link this</a>"; 53 if ( $value ) { 54 $attr = "$name='$value'"; 55 $expected_attr = "$name='" . trim( $value, ';' ) . "'"; 56 } else { 57 $attr = $expected_attr = $name; 58 } 59 $string = "<a $attr>I link this</a>"; 60 $expect_string = "<a $expected_attr>I link this</a>"; 54 61 $this->assertEquals( $expect_string, wp_kses( $string, $allowedposttags ) ); 55 62 }
Note: See TracChangeset
for help on using the changeset viewer.