Changeset 41403 for branches/4.5
- Timestamp:
- 09/19/2017 10:15:01 AM (8 years ago)
- Location:
- branches/4.5
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.5
-
branches/4.5/src/wp-includes/js/tinymce/plugins/wplink/plugin.js
r37454 r41403 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 ); … … 217 217 text = inputInstance.getLinkText(); 218 218 editor.focus(); 219 220 var parser = document.createElement( 'a' ); 221 parser.href = href; 222 223 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 224 href = ''; 225 } 219 226 220 227 if ( ! href ) { -
branches/4.5/src/wp-includes/js/wplink.js
r37154 r41403 314 314 315 315 if ( attrs.target ) { 316 html += ' target="' + attrs.target + '"';316 html += ' rel="noopener" target="' + attrs.target + '"'; 317 317 } 318 318 … … 338 338 attrs = wpLink.getAttrs(); 339 339 text = inputs.text.val(); 340 341 var parser = document.createElement( 'a' ); 342 parser.href = attrs.href; 343 344 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 345 attrs.href = ''; 346 } 340 347 341 348 // If there's no href, return. … … 394 401 editor.selection.moveToBookmark( editor.windowManager.wplinkBookmark ); 395 402 editor.windowManager.wplinkBookmark = null; 403 } 404 405 var parser = document.createElement( 'a' ); 406 parser.href = attrs.href; 407 408 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 409 attrs.href = ''; 396 410 } 397 411
Note: See TracChangeset
for help on using the changeset viewer.