Changeset 55272
- Timestamp:
- 02/07/2023 04:16:47 PM (18 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r55245 r55272 481 481 $text = preg_replace( '|<br\s*/?>\s*<br\s*/?>|', "\n\n", $text ); 482 482 483 $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|figcaption|details|menu|summary)';483 $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; 484 484 485 485 // Add a double line break above block-level opening tags. … … 569 569 if ( $br ) { 570 570 // Replace newlines that shouldn't be touched with a placeholder. 571 $text = preg_replace_callback( '/<(script|style|svg ).*?<\/\\1>/s', '_autop_newline_preservation_helper', $text );571 $text = preg_replace_callback( '/<(script|style|svg).*?<\/\\1>/s', '_autop_newline_preservation_helper', $text ); 572 572 573 573 // Normalize <br> -
trunk/tests/phpunit/tests/formatting/wpAutop.php
r53687 r55272 106 106 107 107 /** 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 108 165 * wpautop() Should not add <p> and <br/> around <source> and <track> 109 166 * … … 309 366 'area', 310 367 'address', 311 'math',312 368 'style', 313 369 'p',
Note: See TracChangeset
for help on using the changeset viewer.