Ticket #31158: 31158.4.patch
| File 31158.4.patch, 1.2 KB (added by , 11 years ago) |
|---|
-
src/wp-includes/js/tinymce/plugins/wpview/plugin.js
173 173 return; 174 174 } 175 175 176 node = editor.selection.getNode(); 176 if ( ! event.load ) { 177 node = editor.selection.getNode(); 177 178 178 // When a url is pasted, only try to embed it when pasted in an empty paragrapgh.179 if ( event.content.match( /^\s*(https?:\/\/[^\s"]+)\s*$/i ) &&180 ( node.nodeName !== 'P' || node.parentNode !== editor.getBody() || ! editor.dom.isEmpty( node ) ) ) {179 if ( node && node.nodeName !== 'BODY' && /^\s*https?:\/\/\S+\s*$/i.test( event.content ) ) { 180 // When a url is pasted or inserted, only try to embed it when it is in an empty paragrapgh. 181 node = editor.dom.getParent( node, 'p' ); 181 182 182 return; 183 if ( node && /^[\s\uFEFF\u00A0]*$/.test( node.textContent || node.innerText ) ) { 184 // Make sure there are no empty inline elements in the <p> 185 node.innerHTML = ''; 186 } else { 187 return; 188 } 189 } 183 190 } 184 191 185 192 event.content = wp.mce.views.setMarkers( event.content );
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)