Changeset 49215
- Timestamp:
- 10/19/2020 11:37:53 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-site-health.php
r49193 r49215 731 731 ), 732 732 'actions' => sprintf( 733 '<p><a href="%s" target="_blank" rel="noopener noreferrer">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',733 '<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>', 734 734 esc_url( wp_get_update_php_url() ), 735 735 __( 'Learn more about updating PHP' ), … … 843 843 /* translators: Localized team handbook, if one exists. */ 844 844 esc_url( __( 'https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions' ) ), 845 'target="_blank" rel="noopener noreferrer"',845 'target="_blank" rel="noopener"', 846 846 sprintf( 847 847 ' <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span>', … … 1160 1160 ), 1161 1161 'actions' => sprintf( 1162 '<p><a href="%s" target="_blank" rel="noopener noreferrer">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',1162 '<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>', 1163 1163 /* translators: Localized version of WordPress requirements if one exists. */ 1164 1164 esc_url( __( 'https://wordpress.org/about/requirements/' ) ), … … 1397 1397 1398 1398 $result['actions'] = sprintf( 1399 '<p><a href="%s" target="_blank" rel="noopener noreferrer">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',1399 '<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>', 1400 1400 /* translators: Localized Support reference. */ 1401 1401 esc_url( __( 'https://wordpress.org/support' ) ), … … 1435 1435 ), 1436 1436 'actions' => sprintf( 1437 '<p><a href="%s" target="_blank" rel="noopener noreferrer">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',1437 '<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>', 1438 1438 /* translators: Documentation explaining debugging in WordPress. */ 1439 1439 esc_url( __( 'https://wordpress.org/support/article/debugging-in-wordpress/' ) ), … … 1504 1504 ), 1505 1505 'actions' => sprintf( 1506 '<p><a href="%s" target="_blank" rel="noopener noreferrer">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',1506 '<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>', 1507 1507 /* translators: Documentation explaining HTTPS and why it should be used. */ 1508 1508 esc_url( __( 'https://wordpress.org/support/article/why-should-i-use-https/' ) ), -
trunk/src/wp-admin/includes/dashboard.php
r49146 r49215 1762 1762 <?php 1763 1763 printf( 1764 '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',1764 '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>', 1765 1765 esc_url( wp_get_update_php_url() ), 1766 1766 __( 'Learn more about updating PHP' ), -
trunk/src/wp-admin/includes/media.php
r49209 r49215 3217 3217 __( '<a href="%1$s" %2$s>Describe the purpose of the image%3$s</a>. Leave empty if the image is purely decorative.' ), 3218 3218 esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ), 3219 'target="_blank" rel="noopener noreferrer"',3219 'target="_blank" rel="noopener"', 3220 3220 sprintf( 3221 3221 '<span class="screen-reader-text"> %s</span>', -
trunk/src/wp-includes/class-walker-nav-menu.php
r49193 r49215 174 174 $atts['target'] = ! empty( $item->target ) ? $item->target : ''; 175 175 if ( '_blank' === $item->target && empty( $item->xfn ) ) { 176 $atts['rel'] = 'noopener noreferrer';176 $atts['rel'] = 'noopener'; 177 177 } else { 178 178 $atts['rel'] = $item->xfn; -
trunk/src/wp-includes/comment.php
r49211 r49215 3648 3648 $value = get_comment_link( $comment->comment_ID ); 3649 3649 $value = sprintf( 3650 '<a href="%s" target="_blank" rel="no referrer noopener">%s</a>',3650 '<a href="%s" target="_blank" rel="noopener">%s</a>', 3651 3651 esc_url( $value ), 3652 3652 esc_html( $value ) -
trunk/src/wp-includes/formatting.php
r49193 r49215 3154 3154 3155 3155 /** 3156 * Adds rel noreferrer and noopenerto all HTML A elements that have a target.3156 * Adds `rel="noopener"` to all HTML A elements that have a target. 3157 3157 * 3158 3158 * @since 5.1.0 3159 * @since 5.6.0 Removed 'noreferrer' relationship. 3159 3160 * 3160 3161 * @param string $text Content that may contain HTML A elements. … … 3189 3190 3190 3191 /** 3191 * Callback to add rel="noreferrer noopener" string to HTML A element. 3192 * 3193 * Will not duplicate existing noreferrer and noopener values 3194 * to prevent from invalidating the HTML. 3192 * Callback to add `rel="noopener"` string to HTML A element. 3193 * 3194 * Will not duplicate an existing 'noopener' value to avoid invalidating the HTML. 3195 3195 * 3196 3196 * @since 5.1.0 3197 * 3198 * @param array $matches Single Match 3199 * @return string HTML A Element with rel noreferrer noopener in addition to any existing values 3197 * @since 5.6.0 Removed 'noreferrer' relationship. 3198 * 3199 * @param array $matches Single match. 3200 * @return string HTML A Element with `rel="noopener"` in addition to any existing values. 3200 3201 */ 3201 3202 function wp_targeted_link_rel_callback( $matches ) { … … 3220 3221 * @param string $link_html The matched content of the link tag including all HTML attributes. 3221 3222 */ 3222 $rel = apply_filters( 'wp_targeted_link_rel', 'noopener noreferrer', $link_html );3223 $rel = apply_filters( 'wp_targeted_link_rel', 'noopener', $link_html ); 3223 3224 3224 3225 // Return early if no rel values to be added or if no actual target attribute. -
trunk/src/wp-includes/functions.php
r49212 r49215 7541 7541 echo '<p class="button-container">'; 7542 7542 printf( 7543 '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',7543 '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>', 7544 7544 esc_url( $direct_update_url ), 7545 7545 __( 'Update PHP' ), -
trunk/src/wp-includes/media-template.php
r49207 r49215 161 161 __( '<a href="%1$s" %2$s>Describe the purpose of the image%3$s</a>. Leave empty if the image is purely decorative.' ), 162 162 esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ), 163 'target="_blank" rel="noopener noreferrer"',163 'target="_blank" rel="noopener"', 164 164 sprintf( 165 165 '<span class="screen-reader-text"> %s</span>', -
trunk/src/wp-includes/widgets/class-wp-widget-custom-html.php
r49193 r49215 147 147 $content = apply_filters( 'widget_text', $instance['content'], $simulated_text_widget_instance, $this ); 148 148 149 // Adds noreferrer and noopener relationships, without duplicating values, to all HTML A elements that have a target.149 // Adds 'noopener' relationship, without duplicating values, to all HTML A elements that have a target. 150 150 $content = wp_targeted_link_rel( $content ); 151 151 -
trunk/src/wp-includes/widgets/class-wp-widget-text.php
r49120 r49215 332 332 $text = preg_replace_callback( '#<(video|iframe|object|embed)\s[^>]*>#i', array( $this, 'inject_video_max_width_style' ), $text ); 333 333 334 // Adds noreferrer and noopener relationships, without duplicating values, to all HTML A elements that have a target.334 // Adds 'noopener' relationship, without duplicating values, to all HTML A elements that have a target. 335 335 $text = wp_targeted_link_rel( $text ); 336 336 -
trunk/src/wp-login.php
r49110 r49215 690 690 691 691 printf( 692 '<a href="%s" rel="noopener noreferrer" target="_blank">%s%s</a>',692 '<a href="%s" rel="noopener" target="_blank">%s%s</a>', 693 693 esc_url( $admin_email_help_url ), 694 694 __( 'Why is this important?' ), … … 1541 1541 if ( links[i].href ) { 1542 1542 links[i].target = '_blank'; 1543 links[i].rel = 'no referrer noopener';1543 links[i].rel = 'noopener'; 1544 1544 } 1545 1545 } -
trunk/tests/phpunit/tests/formatting/WPTargetedLinkRel.php
r48937 r49215 9 9 public function test_add_to_links_with_target_blank() { 10 10 $content = '<p>Links: <a href="/" target="_blank">No rel</a></p>'; 11 $expected = '<p>Links: <a href="/" target="_blank" rel="noopener noreferrer">No rel</a></p>';11 $expected = '<p>Links: <a href="/" target="_blank" rel="noopener">No rel</a></p>'; 12 12 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 13 13 } … … 15 15 public function test_add_to_links_with_target_foo() { 16 16 $content = '<p>Links: <a href="/" target="foo">No rel</a></p>'; 17 $expected = '<p>Links: <a href="/" target="foo" rel="noopener noreferrer">No rel</a></p>';17 $expected = '<p>Links: <a href="/" target="foo" rel="noopener">No rel</a></p>'; 18 18 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 19 19 } … … 21 21 public function test_target_as_first_attribute() { 22 22 $content = '<p>Links: <a target="_blank" href="#">No rel</a></p>'; 23 $expected = '<p>Links: <a target="_blank" href="#" rel="noopener noreferrer">No rel</a></p>';23 $expected = '<p>Links: <a target="_blank" href="#" rel="noopener">No rel</a></p>'; 24 24 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 25 25 } … … 27 27 public function test_add_to_existing_rel() { 28 28 $content = '<p>Links: <a href="/" rel="existing values" target="_blank">Existing rel</a></p>'; 29 $expected = '<p>Links: <a href="/" rel="existing values noopener noreferrer" target="_blank">Existing rel</a></p>';29 $expected = '<p>Links: <a href="/" rel="existing values noopener" target="_blank">Existing rel</a></p>'; 30 30 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 31 31 } … … 33 33 public function test_no_duplicate_values_added() { 34 34 $content = '<p>Links: <a href="/" rel="existing noopener values" target="_blank">Existing rel</a></p>'; 35 $expected = '<p>Links: <a href="/" rel="existing noopener values noreferrer" target="_blank">Existing rel</a></p>';35 $expected = '<p>Links: <a href="/" rel="existing noopener values" target="_blank">Existing rel</a></p>'; 36 36 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 37 37 } … … 39 39 public function test_rel_with_single_quote_delimiter() { 40 40 $content = '<p>Links: <a href="/" rel=\'existing values\' target="_blank">Existing rel</a></p>'; 41 $expected = '<p>Links: <a href="/" rel="existing values noopener noreferrer" target="_blank">Existing rel</a></p>';41 $expected = '<p>Links: <a href="/" rel="existing values noopener" target="_blank">Existing rel</a></p>'; 42 42 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 43 43 } … … 45 45 public function test_rel_with_no_delimiter() { 46 46 $content = '<p>Links: <a href="/" rel=existing target="_blank">Existing rel</a></p>'; 47 $expected = '<p>Links: <a href="/" rel="existing noopener noreferrer" target="_blank">Existing rel</a></p>';47 $expected = '<p>Links: <a href="/" rel="existing noopener" target="_blank">Existing rel</a></p>'; 48 48 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 49 49 } … … 51 51 public function test_rel_value_spaced_and_no_delimiter() { 52 52 $content = '<p>Links: <a href="/" rel = existing target="_blank">Existing rel</a></p>'; 53 $expected = '<p>Links: <a href="/" rel="existing noopener noreferrer" target="_blank">Existing rel</a></p>';53 $expected = '<p>Links: <a href="/" rel="existing noopener" target="_blank">Existing rel</a></p>'; 54 54 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 55 55 } … … 57 57 public function test_escaped_quotes() { 58 58 $content = '<p>Links: <a href=\"/\" rel=\"existing values\" target=\"_blank\">Existing rel</a></p>'; 59 $expected = '<p>Links: <a href=\"/\" rel=\"existing values noopener noreferrer\" target=\"_blank\">Existing rel</a></p>';59 $expected = '<p>Links: <a href=\"/\" rel=\"existing values noopener\" target=\"_blank\">Existing rel</a></p>'; 60 60 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 61 61 } … … 63 63 public function test_ignore_links_with_no_target() { 64 64 $content = '<p>Links: <a href="/" target="_blank">Change me</a> <a href="/">Do not change me</a></p>'; 65 $expected = '<p>Links: <a href="/" target="_blank" rel="noopener noreferrer">Change me</a> <a href="/">Do not change me</a></p>';65 $expected = '<p>Links: <a href="/" target="_blank" rel="noopener">Change me</a> <a href="/">Do not change me</a></p>'; 66 66 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 67 67 } … … 86 86 public function test_wp_targeted_link_rel_filters_run() { 87 87 $content = '<p>Links: <a href="/" target="_blank">No rel</a></p>'; 88 $expected = '<p>Links: <a href="/" target="_blank" rel="noopener noreferrer">No rel</a></p>';88 $expected = '<p>Links: <a href="/" target="_blank" rel="noopener">No rel</a></p>'; 89 89 90 90 $post = $this->factory()->post->create_and_get( … … 104 104 public function test_wp_targeted_link_rel_should_preserve_json() { 105 105 $content = '<p>Links: <a href=\"\/\" target=\"_blank\">No rel<\/a><\/p>'; 106 $expected = '<p>Links: <a href=\"\/\" target=\"_blank\" rel=\"noopener noreferrer\">No rel<\/a><\/p>';106 $expected = '<p>Links: <a href=\"\/\" target=\"_blank\" rel=\"noopener\">No rel<\/a><\/p>'; 107 107 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 108 108 } … … 115 115 public function test_wp_targeted_link_rel_skips_style_and_scripts() { 116 116 $content = '<style><a href="/" target=a></style><p>Links: <script>console.log("<a href=\'/\' target=a>hi</a>");</script><script>alert(1);</script>here <a href="/" target=_blank>aq</a></p><script>console.log("<a href=\'last\' target=\'_blank\'")</script>'; 117 $expected = '<style><a href="/" target=a></style><p>Links: <script>console.log("<a href=\'/\' target=a>hi</a>");</script><script>alert(1);</script>here <a href="/" target="_blank" rel="noopener noreferrer">aq</a></p><script>console.log("<a href=\'last\' target=\'_blank\'")</script>';117 $expected = '<style><a href="/" target=a></style><p>Links: <script>console.log("<a href=\'/\' target=a>hi</a>");</script><script>alert(1);</script>here <a href="/" target="_blank" rel="noopener">aq</a></p><script>console.log("<a href=\'last\' target=\'_blank\'")</script>'; 118 118 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 119 119 } … … 132 132 public function test_wp_targeted_link_rel_tab_separated_values_are_split() { 133 133 $content = "<p>Links: <a href=\"/\" target=\"_blank\" rel=\"ugc\t\tnoopener\t\">No rel</a></p>"; 134 $expected = '<p>Links: <a href="/" target="_blank" rel="ugc noopener noreferrer">No rel</a></p>';134 $expected = '<p>Links: <a href="/" target="_blank" rel="ugc noopener">No rel</a></p>'; 135 135 $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); 136 136 } -
trunk/tests/phpunit/tests/menu/walker-nav-menu.php
r46586 r49215 38 38 39 39 /** 40 * Tests when an item's target is _blank, that rel="noopener noreferrer" is added.40 * Tests when an item's target is _blank, that rel="noopener" is added. 41 41 * 42 42 * @ticket 43290 … … 65 65 $this->walker->start_el( $expected, (object) $item, 0, (object) $args ); 66 66 67 $this->assertSame( "<li id=\"menu-item-{$post_id}\" class=\"menu-item-{$post_id}\"><a target=\"_blank\" rel=\"noopener noreferrer\">{$post_title}</a>", $expected );67 $this->assertSame( "<li id=\"menu-item-{$post_id}\" class=\"menu-item-{$post_id}\"><a target=\"_blank\" rel=\"noopener\">{$post_title}</a>", $expected ); 68 68 } 69 69 -
trunk/tests/phpunit/tests/privacy/wpPrivacyGeneratePersonalDataExportFile.php
r49090 r49215 479 479 array( 480 480 'name' => 'Comment URL', 481 'value' => '<a href="http://localhost:8888/46894/2020/01/31/hello-world/#comment-2" target="_blank" rel="no referrer noopener">http://localhost:8888/46894/2020/01/31/hello-world/#comment-2</a>',481 'value' => '<a href="http://localhost:8888/46894/2020/01/31/hello-world/#comment-2" target="_blank" rel="noopener">http://localhost:8888/46894/2020/01/31/hello-world/#comment-2</a>', 482 482 ), 483 483 ), … … 509 509 array( 510 510 'name' => 'Comment URL', 511 'value' => '<a href="http://localhost:8888/46894/2020/01/31/hello-world/#comment-3" target="_blank" rel="no referrer noopener">http://localhost:8888/46894/2020/01/31/hello-world/#comment-3</a>',511 'value' => '<a href="http://localhost:8888/46894/2020/01/31/hello-world/#comment-3" target="_blank" rel="noopener">http://localhost:8888/46894/2020/01/31/hello-world/#comment-3</a>', 512 512 ), 513 513 ), … … 621 621 array( 622 622 'name' => 'Comment URL', 623 'value' => '<a href="http://localhost:8888/46894/2020/01/31/hello-world/#comment-2" target="_blank" rel="no referrer noopener">http://localhost:8888/46894/2020/01/31/hello-world/#comment-2</a>',623 'value' => '<a href="http://localhost:8888/46894/2020/01/31/hello-world/#comment-2" target="_blank" rel="noopener">http://localhost:8888/46894/2020/01/31/hello-world/#comment-2</a>', 624 624 ), 625 625 ), -
trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php
r49047 r49215 1163 1163 ), 1164 1164 'description' => array( 1165 'raw' => '<a href="#" target="_blank" rel="noopener noreferrer">link</a>',1166 'rendered' => '<p><a href="#" target="_blank" rel="noopener noreferrer">link</a></p>',1165 'raw' => '<a href="#" target="_blank" rel="noopener">link</a>', 1166 'rendered' => '<p><a href="#" target="_blank" rel="noopener">link</a></p>', 1167 1167 ), 1168 1168 'caption' => array( 1169 'raw' => '<a href="#" target="_blank" rel="noopener noreferrer">link</a>',1170 'rendered' => '<p><a href="#" target="_blank" rel="noopener noreferrer">link</a></p>',1169 'raw' => '<a href="#" target="_blank" rel="noopener">link</a>', 1170 'rendered' => '<p><a href="#" target="_blank" rel="noopener">link</a></p>', 1171 1171 ), 1172 1172 ), -
trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php
r49108 r49215 3697 3697 ), 3698 3698 'content' => array( 3699 'raw' => '<a href="#" target="_blank" rel="noopener noreferrer">link</a>',3700 'rendered' => '<p><a href="#" target="_blank" rel="noopener noreferrer">link</a></p>',3699 'raw' => '<a href="#" target="_blank" rel="noopener">link</a>', 3700 'rendered' => '<p><a href="#" target="_blank" rel="noopener">link</a></p>', 3701 3701 ), 3702 3702 'excerpt' => array( 3703 'raw' => '<a href="#" target="_blank" rel="noopener noreferrer">link</a>',3704 'rendered' => '<p><a href="#" target="_blank" rel="noopener noreferrer">link</a></p>',3703 'raw' => '<a href="#" target="_blank" rel="noopener">link</a>', 3704 'rendered' => '<p><a href="#" target="_blank" rel="noopener">link</a></p>', 3705 3705 ), 3706 3706 ), -
trunk/tests/phpunit/tests/widgets/custom-html-widget.php
r48937 r49215 305 305 306 306 /** 307 * Ensure that rel="noopener noreferrer" is added to links with a target.307 * Ensure that rel="noopener" is added to links with a target. 308 308 * 309 309 * @ticket 46421 … … 327 327 328 328 $output = get_echo( array( $widget, 'widget' ), array( $args, $instance ) ); 329 $this->assertContains( 'rel="noopener noreferrer"', $output );330 } 331 332 /** 333 * Ensure that rel="noopener noreferrer" is not added to links without a target.329 $this->assertContains( 'rel="noopener"', $output ); 330 } 331 332 /** 333 * Ensure that rel="noopener" is not added to links without a target. 334 334 * 335 335 * @ticket 46421 … … 353 353 354 354 $output = get_echo( array( $widget, 'widget' ), array( $args, $instance ) ); 355 $this->assertNotContains( 'rel="noopener noreferrer"', $output );355 $this->assertNotContains( 'rel="noopener"', $output ); 356 356 } 357 357 -
trunk/tests/phpunit/tests/widgets/media-image-widget.php
r49052 r49215 543 543 $this->assertContains( '<a href="https://example.org"', $output ); 544 544 $this->assertContains( 'target="_blank"', $output ); 545 $this->assertContains( 'rel="noopener noreferrer"', $output );545 $this->assertContains( 'rel="noopener"', $output ); 546 546 547 547 // Populate caption in attachment. -
trunk/tests/phpunit/tests/widgets/text-widget.php
r48937 r49215 1004 1004 1005 1005 /** 1006 * Ensure that rel="noopener noreferrer" is added to links with a target.1006 * Ensure that rel="noopener" is added to links with a target. 1007 1007 * 1008 1008 * @ticket 46421 … … 1027 1027 $output = get_echo( array( $widget, 'widget' ), array( $args, $instance ) ); 1028 1028 1029 $this->assertContains( 'rel="noopener noreferrer"', $output );1030 } 1031 1032 /** 1033 * Ensure that rel="noopener noreferrer" is not added to links without a target.1029 $this->assertContains( 'rel="noopener"', $output ); 1030 } 1031 1032 /** 1033 * Ensure that rel="noopener" is not added to links without a target. 1034 1034 * 1035 1035 * @ticket 46421 … … 1054 1054 $output = get_echo( array( $widget, 'widget' ), array( $args, $instance ) ); 1055 1055 1056 $this->assertNotContains( 'rel="noopener noreferrer"', $output );1056 $this->assertNotContains( 'rel="noopener"', $output ); 1057 1057 } 1058 1058 } -
trunk/tests/qunit/index.html
r49151 r49215 1174 1174 <input type="text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} /> 1175 1175 </label> 1176 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener noreferrer">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p>1176 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p> 1177 1177 <# } #> 1178 1178 <label class="setting" data-setting="title"> … … 1339 1339 <input type="text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} /> 1340 1340 </label> 1341 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener noreferrer">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p>1341 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p> 1342 1342 <# } #> 1343 1343 <label class="setting" data-setting="title"> … … 1631 1631 <input type="text" data-setting="alt" aria-describedby="alt-text-description" /> 1632 1632 </label> 1633 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener noreferrer">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p>1633 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p> 1634 1634 1635 1635 <label class="setting caption"> … … 1686 1686 <input type="text" data-setting="alt" value="{{ data.model.alt }}" aria-describedby="alt-text-description" /> 1687 1687 </label> 1688 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener noreferrer">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p>1688 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p> 1689 1689 1690 1690 <label class="setting caption">
Note: See TracChangeset
for help on using the changeset viewer.