From 30bb628489fd3ab738abfbbdbf6d193c80cf71b1 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 12 Dec 2016 01:45:35 +0000 Subject: [PATCH] Customize: Prevent single quotes (apostrophes) in `custom_css` values from unexpectedly causing false positives for unbalanced character validation errors. Props westonruter. See #39218, #35395. Merges [39559] to the 4.7 branch. Fixes #39198. Built from https://develop.svn.wordpress.org/branches/4.7@39567 git-svn-id: http://core.svn.wordpress.org/branches/4.7@39507 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../customize/class-wp-customize-custom-css-setting.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/wp-includes/customize/class-wp-customize-custom-css-setting.php b/wp-includes/customize/class-wp-customize-custom-css-setting.php index cb0f151aed..3189ae9262 100644 --- a/wp-includes/customize/class-wp-customize-custom-css-setting.php +++ b/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;