Ticket #38511: 38511.4.patch
File 38511.4.patch, 1.4 KB (added by , 9 years ago) |
---|
-
src/wp-includes/js/mce-view.js
511 511 }, '\u200B' ); 512 512 } 513 513 514 // For Firefox, do this here to make sure there's a selection so it's a noop later. 515 editor.quirks.refreshContentEditable(); 516 514 517 // Seems the browsers need a bit of time to insert/set the view nodes, 515 518 // or the iframe will fail especially when switching Text => Visual. 516 519 setTimeout( function() { -
src/wp-includes/js/tinymce/plugins/wpview/plugin.js
132 132 133 133 if ( /^https?:\/\/\S+$/i.test( content ) ) { 134 134 event.content = content; 135 } else { 136 // Firefox prettyprints text/html into the clipboard, inserting newlines to wrap long lines. 137 // This messes up shortcodes with attributes (they get autoped and won't parse), so remove them. 138 var match; 139 if ( content.indexOf( '\u000a' ) !== -1 && ( match = /^\[[^\]]+?\]/.exec( content ) ) !== null ) { 140 event.content = match[0].replace( /\u000a/g, '' ) + content.slice( match[0].length ); 141 } 135 142 } 136 143 } 137 144 } );