Links: Existing rel
'; - $expected = 'Links: Existing rel
'; + $expected = 'Links: Existing rel
'; $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); } @@ -54,12 +54,6 @@ class Tests_Targeted_Link_Rel extends WP_UnitTestCase { $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); } - public function test_rel_value_spaced_and_no_delimiter_and_values_to_escape() { - $content = 'Links: Existing rel
'; - $expected = 'Links: Existing rel
'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); - } - public function test_escaped_quotes() { $content = 'Links: Existing rel
'; $expected = 'Links: Existing rel
'; @@ -114,17 +108,13 @@ class Tests_Targeted_Link_Rel extends WP_UnitTestCase { } /** - * Ensure correct quotes are used when relation attribute (rel) is missing. + * Ensure the content of style and script tags are not processed * * @ticket 47244 */ - public function test_wp_targeted_link_rel_should_use_correct_quotes() { - $content = 'Links: No rel<\/a><\/p>';
- $expected = ' Links: No rel<\/a><\/p>';
- $this->assertEquals( $expected, wp_targeted_link_rel( $content ) );
-
- $content = ' Links: No rel<\/a><\/p>';
- $expected = ' Links: No rel<\/a><\/p>';
+ public function test_wp_targeted_link_rel_skips_style_and_scripts() {
+ $content = ' Links: here aq Links: here aq Links: No rel Links: No rel