X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/03f2fa83c13c1b532284205fa7efcab9b8b2c41f..0459461f9ea42e0b090759ff6fe5f48360bef750:/wp-includes/formatting.php diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index ff4167d2..65758680 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -216,7 +216,7 @@ function wptexturize( $text, $reset = false ) { // Look for shortcodes and HTML elements. - preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20]++)@', $text, $matches ); + preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20=]++)@', $text, $matches ); $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] ); $found_shortcodes = ! empty( $tagnames ); $shortcode_regex = $found_shortcodes ? _get_wptexturize_shortcode_regex( $tagnames ) : ''; @@ -233,6 +233,10 @@ function wptexturize( $text, $reset = false ) { continue; } else { // This is an HTML element delimiter. + + // Replace each & with & unless it already looks like an entity. + $curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&', $curl ); + _wptexturize_pushpop_element( $curl, $no_texturize_tags_stack, $no_texturize_tags ); } @@ -3892,14 +3896,20 @@ function sanitize_option( $option, $value ) { * @return The value with the callback applied to all non-arrays and non-objects inside it. */ function map_deep( $value, $callback ) { - if ( is_array( $value ) || is_object( $value ) ) { - foreach ( $value as &$item ) { - $item = map_deep( $item, $callback ); + if ( is_array( $value ) ) { + foreach ( $value as $index => $item ) { + $value[ $index ] = map_deep( $item, $callback ); + } + } elseif ( is_object( $value ) ) { + $object_vars = get_object_vars( $value ); + foreach ( $object_vars as $property_name => $property_value ) { + $value->$property_name = map_deep( $property_value, $callback ); } - return $value; } else { - return call_user_func( $callback, $value ); + $value = call_user_func( $callback, $value ); } + + return $value; } /** @@ -4524,7 +4534,7 @@ function print_emoji_detection_script() { * * @param string The emoji base URL. */ - 'baseUrl' => apply_filters( 'emoji_url', set_url_scheme( '//s.w.org/images/core/emoji/72x72/' ) ), + 'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/72x72/' ), /** * Filter the extension of the emoji files. @@ -4571,7 +4581,7 @@ function print_emoji_detection_script() { ?> + .postbox .button-link .edit-box { display: none; } + .wp-admin .edit-box { display: block; opacity: 0; } + .hndle:hover .edit-box, .edit-box:focus { opacity: 1; } + #dashboard-widgets h2 a { text-decoration: underline; } + #dashboard-widgets .hndle .postbox-title-action { float: right; line-height: 1.2; } + '; +} +add_action( 'admin_print_styles-index.php', '_wp_441_dashboard_display_configure_links_css' ); \ No newline at end of file