Ticket #36809: 36809.patch
File 36809.patch, 1.1 KB (added by , 8 years ago) |
---|
-
src/wp-includes/class-walker-nav-menu.php
158 158 $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : ''; 159 159 $atts['href'] = ! empty( $item->url ) ? $item->url : ''; 160 160 161 if( $item->target === '_blank' ){ 162 $atts['rel'] .= ' noopener noreferrer'; 163 $atts['rel'] = trim( $atts['rel'] ); 164 } 165 161 166 /** 162 167 * Filters the HTML attributes applied to a menu item's anchor element. 163 168 * -
src/wp-includes/js/wplink.js
304 304 305 305 return { 306 306 href: $.trim( inputs.url.val() ), 307 target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : null 307 target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : null, 308 rel: inputs.openInNewTab.prop( 'checked' ) ? 'noopener noreferrer' : null 308 309 }; 309 310 }, 310 311