Administration: Consistently escape icon URLs in the admin menu.
Follow-up to [9154], [26664]. Props chintan1896, jigar-bhanushali, mukesh27. Fixes #55496. Built from https://develop.svn.wordpress.org/trunk@53050 git-svn-id: http://core.svn.wordpress.org/trunk@52639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1c5733e796
commit
35ce94f930
|
@ -123,13 +123,13 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||||
* as special cases.
|
* as special cases.
|
||||||
*/
|
*/
|
||||||
if ( ! empty( $item[6] ) ) {
|
if ( ! empty( $item[6] ) ) {
|
||||||
$img = '<img src="' . $item[6] . '" alt="" />';
|
$img = '<img src="' . esc_url( $item[6] ) . '" alt="" />';
|
||||||
|
|
||||||
if ( 'none' === $item[6] || 'div' === $item[6] ) {
|
if ( 'none' === $item[6] || 'div' === $item[6] ) {
|
||||||
$img = '<br />';
|
$img = '<br />';
|
||||||
} elseif ( 0 === strpos( $item[6], 'data:image/svg+xml;base64,' ) ) {
|
} elseif ( 0 === strpos( $item[6], 'data:image/svg+xml;base64,' ) ) {
|
||||||
$img = '<br />';
|
$img = '<br />';
|
||||||
$img_style = ' style="background-image:url(\'' . esc_attr( $item[6] ) . '\')"';
|
$img_style = ' style="background-image:url(\'' . esc_url( $item[6] ) . '\')"';
|
||||||
$img_class = ' svg';
|
$img_class = ' svg';
|
||||||
} elseif ( 0 === strpos( $item[6], 'dashicons-' ) ) {
|
} elseif ( 0 === strpos( $item[6], 'dashicons-' ) ) {
|
||||||
$img = '<br />';
|
$img = '<br />';
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.0-alpha-53049';
|
$wp_version = '6.0-alpha-53050';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue