Changeset 39912
- Timestamp:
- 01/16/2017 01:05:33 AM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/editor.js
r39911 r39912 168 168 */ 169 169 function removep( html ) { 170 var blocklist = 'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset ',170 var blocklist = 'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure', 171 171 blocklist1 = blocklist + '|div|p', 172 172 blocklist2 = blocklist + '|pre', … … 330 330 return a.replace( /\n/g, '<wp-line-break>' ); 331 331 }); 332 } 333 334 if ( text.indexOf( '<figcaption' ) !== -1 ) { 335 text = text.replace( /\s*(<figcaption[^>]*>)/g, '$1' ); 336 text = text.replace( /<\/figcaption>\s*/g, '</figcaption>' ); 332 337 } 333 338 -
trunk/src/wp-includes/formatting.php
r39326 r39912 505 505 $pee = preg_replace( '%\s*([<\[]/(?:audio|video)[>\]])%', '$1', $pee ); 506 506 $pee = preg_replace( '%\s*(<(?:source|track)[^>]*>)\s*%', '$1', $pee ); 507 } 508 509 // Collapse line breaks before and after <figcaption> elements. 510 if ( strpos( $pee, '<figcaption' ) !== false ) { 511 $pee = preg_replace( '|\s*(<figcaption[^>]*>)|', '$1', $pee ); 512 $pee = preg_replace( '|</figcaption>\s*|', '</figcaption>', $pee ); 507 513 } 508 514
Note: See TracChangeset
for help on using the changeset viewer.