Changeset 41411
- Timestamp:
- 09/19/2017 10:15:44 AM (7 years ago)
- Location:
- branches/3.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
-
branches/3.7/src
- Property svn:mergeinfo changed
/trunk/src merged: 41393
- Property svn:mergeinfo changed
-
branches/3.7/src/wp-includes/js/wplink.js
r25748 r41411 165 165 attrs = wpLink.getAttrs(); 166 166 167 var parser = document.createElement( 'a' ); 168 parser.href = attrs.href; 169 170 if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line 171 attrs.href = ''; 172 } 173 167 174 // If there's no href, return. 168 175 if ( ! attrs.href || attrs.href == 'http://' ) … … 175 182 html += ' title="' + attrs.title + '"'; 176 183 if ( attrs.target ) 177 html += ' target="' + attrs.target + '"';184 html += ' rel="noopener" target="' + attrs.target + '"'; 178 185 179 186 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.