WordPress.org

Make WordPress Core

Ticket #31988: 31988.patch

File 31988.patch, 729 bytes (added by azaozz, 5 years ago)
  • src/wp-includes/js/tinymce/plugins/wpview/plugin.js

     
    193193                                // When a url is pasted or inserted, only try to embed it when it is in an empty paragrapgh.
    194194                                node = editor.dom.getParent( node, 'p' );
    195195
    196                                 if ( node && /^[\s\uFEFF\u00A0]*$/.test( node.textContent || node.innerText ) ) {
     196                                if ( node && /^[\s\uFEFF\u00A0]*$/.test( node.textContent || node.innerText || '' ) ) {
    197197                                        // Make sure there are no empty inline elements in the <p>
    198198                                        node.innerHTML = '';
    199199                                } else {