Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#39728 closed defect (bug) (duplicate)

"Additional CSS" validate syntax error in customizer

Reported by: rishishah Owned by:
Priority: normal Milestone:
Component: Customize Version: 4.8
Severity: normal Keywords:
Cc: Focuses: ui

Description

Validation for Additional CSS in customize is not correct.

STEP TO REPRODUCE

  1. Go to "Appearance>Customize"
  2. Select "Additional CSS"
  3. When I wrote curly brace "{" or "}" inside comment section /* ... */ and save it, it shows me error that
Your curly brackets {} are imbalanced. Make sure there is a closing } for every opening {.

This error should not consider inside comment section /* ... */

Attachments (1)

additional-css-issue.gif​ (1.7 MB ) - added by rishishah 10 years ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
10 years ago

  • Focuses accessibility removed
  • Summary "Additional CSS" validate syntex error in customizer → "Additional CSS" validate syntax error in customizer

#2 @dd32
10 years ago

See also #39198 for where we removed the check for single quotes ' but left it in place for {, }, and ".

We've also got #39218 to use a tokeniser rather than naive regular expressions.

I don't think we should change it further for the 4.7.x branch myself (unless we backport tokenisation). I'd suggest marking this as a duplicate of #39218.

#3 @westonruter
10 years ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed

Duplicate of #39218.

Agreed. Also, I think that the current server-side validation can be eliminated in favor of client-side validation that will come with a proper code editor component in #38707.

Note: See TracTickets for help on using tickets.