Changeset 39204
- Timestamp:
- 11/11/2016 11:06:03 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
r38997 r39204 132 132 133 133 // Remove spaces from empty paragraphs. 134 // Avoid backtracking, can freeze the editor. See #35890. 135 // (This is also quite faster than using only one regex.) 134 // Try to avoid a lot of backtracking, can freeze the editor. See #35890 and #38294. 136 135 event.content = event.content.replace( /<p>([^<>]+)<\/p>/gi, function( tag, text ) { 137 if ( /^( |\s|\u00a0|\ufeff)+$/i.test( text ) ) {136 if ( text === ' ' || ! /\S/.test( text ) ) { 138 137 return '<p><br /></p>'; 139 138 }
Note: See TracChangeset
for help on using the changeset viewer.