Changeset 41408 for branches/4.0
- Timestamp:
- 09/19/2017 10:15:33 AM (8 years ago)
- Location:
- branches/4.0
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/js/wplink.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
-
branches/4.0/src/wp-includes/js/wplink.js
r29335 r41408 207 207 attrs = wpLink.getAttrs(); 208 208 209 var parser = document.createElement( 'a' ); 210 parser.href = attrs.href; 211 212 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 213 attrs.href = ''; 214 } 215 209 216 // If there's no href, return. 210 217 if ( ! attrs.href || attrs.href == 'http://' ) … … 220 227 221 228 if ( attrs.target ) { 222 html += ' target="' + attrs.target + '"';229 html += ' rel="noopener" target="' + attrs.target + '"'; 223 230 } 224 231 … … 271 278 272 279 link = editor.dom.getParent( editor.selection.getNode(), 'a[href]' ); 280 281 var parser = document.createElement( 'a' ); 282 parser.href = attrs.href; 283 284 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 285 attrs.href = ''; 286 } 273 287 274 288 // If the values are empty, unlink and return
Note: See TracChangeset
for help on using the changeset viewer.