Changeset 41402 for branches/4.6
- Timestamp:
- 09/19/2017 10:14:53 AM (8 years ago)
- Location:
- branches/4.6
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
-
branches/4.6/src/wp-includes/js/tinymce/plugins/wplink/plugin.js
r38159 r41402 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 ) { -
branches/4.6/src/wp-includes/js/wplink.js
r38126 r41402 317 317 318 318 if ( attrs.target ) { 319 html += ' target="' + attrs.target + '"';319 html += ' rel="noopener" target="' + attrs.target + '"'; 320 320 } 321 321 … … 341 341 attrs = wpLink.getAttrs(); 342 342 text = inputs.text.val(); 343 344 var parser = document.createElement( 'a' ); 345 parser.href = attrs.href; 346 347 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 348 attrs.href = ''; 349 } 343 350 344 351 // If there's no href, return. … … 397 404 editor.selection.moveToBookmark( editor.windowManager.wplinkBookmark ); 398 405 editor.windowManager.wplinkBookmark = null; 406 } 407 408 var parser = document.createElement( 'a' ); 409 parser.href = attrs.href; 410 411 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 412 attrs.href = ''; 399 413 } 400 414
Note: See TracChangeset
for help on using the changeset viewer.