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
This commit is contained in:
parent
6738759b0c
commit
30bb628489
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue