Changeset 32817
- Timestamp:
- 06/17/2015 05:04:23 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wplink/plugin.js
r32078 r32817 33 33 34 34 editor.on( 'pastepreprocess', function( event ) { 35 var pastedStr = event.content; 35 var pastedStr = event.content, 36 regExp = /^(?:https?:)?\/\/\S+$/i; 36 37 37 if ( ! editor.selection.isCollapsed() ) {38 if ( ! editor.selection.isCollapsed() && ! regExp.test( editor.selection.getContent() ) ) { 38 39 pastedStr = pastedStr.replace( /<[^>]+>/g, '' ); 39 40 pastedStr = tinymce.trim( pastedStr ); 40 41 41 if ( /^(?:https?:)?\/\/\S+$/i.test( pastedStr ) ) {42 if ( regExp.test( pastedStr ) ) { 42 43 editor.execCommand( 'mceInsertLink', false, { 43 44 href: editor.dom.decode( pastedStr )
Note: See TracChangeset
for help on using the changeset viewer.