diff --git a/src/wp-includes/customize/class-wp-customize-custom-css-setting.php b/src/wp-includes/customize/class-wp-customize-custom-css-setting.php index cb0f151aed..3189ae9262 100644 --- a/src/wp-includes/customize/class-wp-customize-custom-css-setting.php +++ b/src/wp-includes/customize/class-wp-customize-custom-css-setting.php @@ -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 \' are uneven. Make sure there is a closing \' for every opening \'.' ) ); - $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 " are uneven. Make sure there is a closing " for every opening ".' ) ); $imbalanced = true; diff --git a/tests/phpunit/tests/customize/custom-css-setting.php b/tests/phpunit/tests/customize/custom-css-setting.php index 102d303a0c..7aff1b43b5 100644 --- a/tests/phpunit/tests/customize/custom-css-setting.php +++ b/tests/phpunit/tests/customize/custom-css-setting.php @@ -364,11 +364,6 @@ class Test_WP_Customize_Custom_CSS_Setting extends WP_UnitTestCase { $result = $this->setting->validate( $imbalanced_double_quotes ); $this->assertTrue( array_key_exists( 'unequal_double_quotes', $result->errors ) ); - // Check for Imbalanced Single Quotes. - $imbalanced_single_quotes = $basic_css . " div.background-image { background-image: url( 'image.jpg ); } "; - $result = $this->setting->validate( $imbalanced_single_quotes ); - $this->assertTrue( array_key_exists( 'unequal_single_quotes', $result->errors ) ); - // Check for Unclosed Parentheses. $unclosed_parentheses = $basic_css . ' div.background-image { background-image: url( "image.jpg" ; } '; $result = $this->setting->validate( $unclosed_parentheses );