Changeset 41393
- Timestamp:
- 09/19/2017 08:00:40 AM (7 years ago)
- Location:
- trunk/src/wp-includes/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wplink/plugin.js
r40801 r41393 5 5 return ( 6 6 '<div id="' + this._id + '" class="wp-link-preview">' + 7 '<a href="' + this.url + '" target="_blank" tabindex="-1">' + this.url + '</a>' +7 '<a href="' + this.url + '" target="_blank" rel="noopener" tabindex="-1">' + this.url + '</a>' + 8 8 '</div>' 9 9 ); … … 249 249 text = inputInstance.getLinkText(); 250 250 editor.focus(); 251 252 var parser = document.createElement( 'a' ); 253 parser.href = href; 254 255 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 256 href = ''; 257 } 251 258 252 259 if ( ! href ) { -
trunk/src/wp-includes/js/wplink.js
r40615 r41393 313 313 314 314 if ( attrs.target ) { 315 html += ' target="' + attrs.target + '"';315 html += ' rel="noopener" target="' + attrs.target + '"'; 316 316 } 317 317 … … 337 337 attrs = wpLink.getAttrs(); 338 338 text = inputs.text.val(); 339 340 var parser = document.createElement( 'a' ); 341 parser.href = attrs.href; 342 343 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 344 attrs.href = ''; 345 } 339 346 340 347 // If there's no href, return. … … 390 397 var attrs = wpLink.getAttrs(), 391 398 $link, text, hasText, $mceCaret; 399 400 var parser = document.createElement( 'a' ); 401 parser.href = attrs.href; 402 403 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 404 attrs.href = ''; 405 } 392 406 393 407 if ( ! attrs.href ) {
Note: See TracChangeset
for help on using the changeset viewer.