mirror of
https://github.com/WordPress/WordPress.git
synced 2024-06-25 22:35:02 +02:00
Sanitization: when falling back to (wait for it...) $fallback
in sanitize_html_class()
, sanitize it as well.
Props MikeHansenMe, wonderboymusic. Fixes #30967. Built from https://develop.svn.wordpress.org/trunk@34377 git-svn-id: http://core.svn.wordpress.org/trunk@34341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
40c15af795
commit
3c66bd6cb6
|
@ -1600,9 +1600,9 @@ function sanitize_html_class( $class, $fallback = '' ) {
|
||||||
//Limit to A-Z,a-z,0-9,_,-
|
//Limit to A-Z,a-z,0-9,_,-
|
||||||
$sanitized = preg_replace( '/[^A-Za-z0-9_-]/', '', $sanitized );
|
$sanitized = preg_replace( '/[^A-Za-z0-9_-]/', '', $sanitized );
|
||||||
|
|
||||||
if ( '' == $sanitized )
|
if ( '' == $sanitized && $fallback ) {
|
||||||
$sanitized = $fallback;
|
return sanitize_html_class( $fallback );
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Filter a sanitized HTML class string.
|
* Filter a sanitized HTML class string.
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-34376';
|
$wp_version = '4.4-alpha-34377';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
Block a user