mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
Remove noscript
from wpautop()
's list of block elements.
Props mdawaffe. Fixes #27268. Built from https://develop.svn.wordpress.org/trunk@28817 git-svn-id: http://core.svn.wordpress.org/trunk@28624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
43320a5825
commit
856e5ef55e
@ -203,7 +203,7 @@ window.switchEditors = {
|
|||||||
var preserve_linebreaks = false,
|
var preserve_linebreaks = false,
|
||||||
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' +
|
blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
|
||||||
'|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section' +
|
'|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section' +
|
||||||
'|article|aside|hgroup|header|footer|nav|figure|details|menu|summary';
|
'|article|aside|hgroup|header|footer|nav|figure|details|menu|summary';
|
||||||
|
|
||||||
if ( pee.indexOf( '<object' ) !== -1 ) {
|
if ( pee.indexOf( '<object' ) !== -1 ) {
|
||||||
|
2
wp-admin/js/editor.min.js
vendored
2
wp-admin/js/editor.min.js
vendored
File diff suppressed because one or more lines are too long
@ -347,7 +347,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|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)';
|
$allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|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