mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-17 08:05:21 +01:00
Formatting: Don't add <p>
tags inside <svg>
tags.
Inline `<svg>`s should generally work, as browsers should just ignore `<p>` or `<br/>` tags that shouldn't be inside the `<svg>`. To keep things neat, however, it's better not add them in the first place. Props jared_smith, nacin, pento. Fixes #9437. Built from https://develop.svn.wordpress.org/trunk@45577 git-svn-id: http://core.svn.wordpress.org/trunk@45388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
93f3335f13
commit
f3ece5149f
@ -580,7 +580,7 @@ function wpautop( $pee, $br = true ) {
|
||||
// Optionally insert line breaks.
|
||||
if ( $br ) {
|
||||
// Replace newlines that shouldn't be touched with a placeholder.
|
||||
$pee = preg_replace_callback( '/<(script|style).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee );
|
||||
$pee = preg_replace_callback( '/<(script|style|svg).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee );
|
||||
|
||||
// Normalize <br>
|
||||
$pee = str_replace( array( '<br>', '<br/>' ), '<br />', $pee );
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-45576';
|
||||
$wp_version = '5.3-alpha-45577';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user