WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/10/2016 06:45:00 AM (4 years ago)
Author:
westonruter
Message:

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

See #39218, #35395.
Fixes #39198.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-custom-css-setting.php

    r39350 r39559  
    192192        }
    193193
    194         // Ensure single quotes are equal.
    195         if ( ! $this->validate_equal_characters( '\'', $css ) ) {
    196             $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>.' ) );
    197             $imbalanced = true;
    198         }
    199 
    200         // Ensure single quotes are equal.
     194        // Ensure double quotes are equal.
    201195        if ( ! $this->validate_equal_characters( '"', $css ) ) {
    202196            $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>.' ) );
Note: See TracChangeset for help on using the changeset viewer.