| 1 | Index: wp-admin/js/editor.dev.js |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/js/editor.dev.js (revision 21078) |
|---|
| 4 | +++ wp-admin/js/editor.dev.js (working copy) |
|---|
| 5 | @@ -177,8 +177,8 @@ |
|---|
| 6 | |
|---|
| 7 | pee = pee + '\n\n'; |
|---|
| 8 | pee = pee.replace(/<br \/>\s*<br \/>/gi, '\n\n'); |
|---|
| 9 | - pee = pee.replace(new RegExp('(<(?:'+blocklist+')(?: [^>]*)?>)', 'gi'), '\n$1'); |
|---|
| 10 | - pee = pee.replace(new RegExp('(</(?:'+blocklist+')>)', 'gi'), '$1\n\n'); |
|---|
| 11 | + pee = pee.replace(new RegExp('(<(?:'+blocklist+')(?: [^>]*)?>)', 'gi'), '\n$1\n'); |
|---|
| 12 | + pee = pee.replace(new RegExp('(</(?:'+blocklist+')>)', 'gi'), '\n$1\n'); |
|---|
| 13 | pee = pee.replace(/<hr( [^>]*)?>/gi, '<hr$1>\n\n'); // hr is self closing block element |
|---|
| 14 | pee = pee.replace(/\r\n|\r/g, '\n'); |
|---|
| 15 | pee = pee.replace(/\n\s*\n+/g, '\n\n'); |
|---|
| 16 | Index: wp-includes/formatting.php |
|---|
| 17 | =================================================================== |
|---|
| 18 | --- wp-includes/formatting.php (revision 21078) |
|---|
| 19 | +++ wp-includes/formatting.php (working copy) |
|---|
| 20 | @@ -222,8 +222,8 @@ |
|---|
| 21 | $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee); |
|---|
| 22 | // Space things out a little |
|---|
| 23 | $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; |
|---|
| 24 | - $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); |
|---|
| 25 | - $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); |
|---|
| 26 | + $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1\n", $pee); |
|---|
| 27 | + $pee = preg_replace('!(</' . $allblocks . '>)!', "\n$1\n", $pee); |
|---|
| 28 | $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines |
|---|
| 29 | if ( strpos($pee, '<object') !== false ) { |
|---|
| 30 | $pee = preg_replace('|\s*<param([^>]*)>\s*|', "<param$1>", $pee); // no pee inside object/embed |
|---|