mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Customize: Prevent single quotes (apostrophes) in custom_css values from unexpectedly causing false positives for unbalanced character validation errors.
See #39218, #35395. Fixes #39198. git-svn-id: https://develop.svn.wordpress.org/trunk@39559 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user