figcaption
should not be treated as a block-level element by wpautop()
. See #25646. Props oso96_2000.
git-svn-id: https://develop.svn.wordpress.org/trunk@27527 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
eaae9961ef
commit
110e19a6a0
@ -205,7 +205,7 @@ window.switchEditors = {
|
|||||||
preserve_br = false,
|
preserve_br = false,
|
||||||
blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select' +
|
blocklist = '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|noscript|legend|section' +
|
'|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section' +
|
||||||
'|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary';
|
'|article|aside|hgroup|header|footer|nav|figure|details|menu|summary';
|
||||||
|
|
||||||
if ( pee.indexOf( '<object' ) !== -1 ) {
|
if ( pee.indexOf( '<object' ) !== -1 ) {
|
||||||
pee = pee.replace( /<object[\s\S]+?<\/object>/g, function( a ) {
|
pee = pee.replace( /<object[\s\S]+?<\/object>/g, function( a ) {
|
||||||
|
@ -234,7 +234,7 @@ function wpautop($pee, $br = true) {
|
|||||||
|
|
||||||
$pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
|
$pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
|
||||||
// Space things out a little
|
// Space things out a little
|
||||||
$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|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';
|
$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|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary)';
|
||||||
$pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
|
$pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
|
||||||
$pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
|
$pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
|
||||||
$pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines
|
$pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines
|
||||||
|
Loading…
Reference in New Issue
Block a user