mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Improve handling the existing rel attribute in wp_rel_nofollow_callback().
Props xknown, sstoqnov. git-svn-id: https://develop.svn.wordpress.org/trunk@45990 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -74,4 +74,10 @@ class Tests_Rel_No_Follow extends WP_UnitTestCase {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function test_append_no_follow_with_valueless_attribute() {
|
||||
$content = '<p>This is some cool <a href="demo.com" download rel="hola">Code</a></p>';
|
||||
$expected = '<p>This is some cool <a href=\"demo.com\" download rel=\"hola nofollow\">Code</a></p>';
|
||||
$this->assertEquals( $expected, wp_rel_nofollow( $content ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user