Changeset 41410
- Timestamp:
- 09/19/2017 10:15:40 AM (8 years ago)
- Location:
- branches/3.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
-
branches/3.8/src/wp-includes/js/wplink.js
r26418 r41410 166 166 attrs = wpLink.getAttrs(); 167 167 168 var parser = document.createElement( 'a' ); 169 parser.href = attrs.href; 170 171 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 172 attrs.href = ''; 173 } 174 168 175 // If there's no href, return. 169 176 if ( ! attrs.href || attrs.href == 'http://' ) … … 176 183 html += ' title="' + attrs.title + '"'; 177 184 if ( attrs.target ) 178 html += ' target="' + attrs.target + '"';185 html += ' rel="noopener" target="' + attrs.target + '"'; 179 186 180 187 html += '>'; … … 221 228 tinyMCEPopup.restoreSelection(); 222 229 e = ed.dom.getParent(ed.selection.getNode(), 'A'); 230 231 var parser = document.createElement( 'a' ); 232 parser.href = attrs.href; 233 234 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 235 attrs.href = ''; 236 } 223 237 224 238 // If the values are empty, unlink and return
Note: See TracChangeset
for help on using the changeset viewer.