mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Customize: Remove wp_targeted_link_rel pre-save filter from change-sets.
The pre-save filters added to links in [43732] could invalidate JSON data when saving Customizer change-sets. This removes the filters when saving and publishing change-sets. Props peterwilsoncc, nikeo for testing. See #45292. git-svn-id: https://develop.svn.wordpress.org/trunk@44714 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -83,4 +83,22 @@ class Tests_Targeted_Link_Rel extends WP_UnitTestCase {
|
||||
$expected = '<p>Links: <a href="/" target="_blank">Do not change me</a></p>';
|
||||
$this->assertEquals( $expected, wp_targeted_link_rel( $content ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure default content filters are added.
|
||||
*
|
||||
* @ticket 45292.
|
||||
*/
|
||||
public function test_wp_targeted_link_rel_filters_run() {
|
||||
$content = '<p>Links: <a href="/" target="_blank">No rel</a></p>';
|
||||
$expected = '<p>Links: <a href="/" target="_blank" rel="noopener noreferrer">No rel</a></p>';
|
||||
|
||||
$post = $this->factory()->post->create_and_get(
|
||||
array(
|
||||
'post_content' => $content,
|
||||
)
|
||||
);
|
||||
|
||||
$this->assertEquals( $expected, $post->post_content );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user