Changeset 27761
- Timestamp:
- 03/27/2014 12:00:17 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/editor.js
r27527 r27761 204 204 var preserve_linebreaks = false, 205 205 preserve_br = false, 206 blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre |select' +207 '| option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section' +206 blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' + 207 '|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section' + 208 208 '|article|aside|hgroup|header|footer|nav|figure|details|menu|summary'; 209 209 -
trunk/src/wp-includes/formatting.php
r27617 r27761 235 235 $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee); 236 236 // Space things out a little 237 $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)';237 $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)'; 238 238 $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); 239 239 $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); -
trunk/tests/phpunit/tests/formatting/Autop.php
r27094 r27761 264 264 $this->assertEquals( $expected2, trim( wpautop( $content2 ) ) ); 265 265 } 266 267 /** 268 * wpautop() Should not add <br/> to "<select>" or "<option>" elements 269 * 270 * @ticket 22230 271 */ 272 public function test_skip_select_option_elements() { 273 $str = 'Country: <select id="state" name="state"><option value="1">Alabama</option><option value="2">Alaska</option><option value="3">Arizona</option><option value="4">Arkansas</option><option value="5">California</option></select>'; 274 $this->assertEquals( "<p>$str</p>", trim( wpautop( $str ) ) ); 275 } 266 276 }
Note: See TracChangeset
for help on using the changeset viewer.