Customize: Prevent single quotes (apostrophes) in `custom_css` values from unexpectedly causing false positives for unbalanced character validation errors.

See #39218, #35395.
Fixes #39198.

Built from https://develop.svn.wordpress.org/trunk@39559


git-svn-id: http://core.svn.wordpress.org/trunk@39499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2016-12-10 06:45:42 +00:00
parent 1b96e389c0
commit 6527c24ab1
2 changed files with 2 additions and 8 deletions

View File

@ -191,13 +191,7 @@ final class WP_Customize_Custom_CSS_Setting extends WP_Customize_Setting {
$imbalanced = true;
}
// Ensure single quotes are equal.
if ( ! $this->validate_equal_characters( '\'', $css ) ) {
$validity->add( 'unequal_single_quotes', __( 'Your single quotes <code>\'</code> are uneven. Make sure there is a closing <code>\'</code> for every opening <code>\'</code>.' ) );
$imbalanced = true;
}
// Ensure single quotes are equal.
// Ensure double quotes are equal.
if ( ! $this->validate_equal_characters( '"', $css ) ) {
$validity->add( 'unequal_double_quotes', __( 'Your double quotes <code>"</code> are uneven. Make sure there is a closing <code>"</code> for every opening <code>"</code>.' ) );
$imbalanced = true;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-39558';
$wp_version = '4.8-alpha-39559';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.