Make WordPress Core

Opened 8 years ago

Closed 8 months ago

#41874 closed enhancement (maybelater)

Code Editor: Extend CSS linter to check for safecss-forbidden properties

Reported by: westonruter's profile westonruter Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: needs-patch
Focuses: Cc:

Description

While there is a custom HTMLHint rule which checks for Kses violations, this does not extend to CSSLint and safecss_filter_attr(). It would be a nice enhancement to get illegal style properties flagged as lint errors as well.

Originally https://github.com/WordPress/better-code-editing/issues/60:

The safecss_filter_attr() function is used by KSES to filter HTML style attributes, removing any properties that are illegal. This should be applied to CSS and style attributes in HTML, so that any illegal properties are flagged as such.

It seems that HTMLHint is not currently applying CSSLint to style attributes, but if it did, then a kses rule added to CSSLint could then apply to both HTML and CSS.

This is for the code editor introduced in [41376] for #12423.

Change History (5)

#1 @westonruter
8 years ago

  • Priority changed from normal to high

Bumping priority to high for visibility and alignment with 4.9 goals, and given proximity to beta 1 deadline.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


8 years ago

#3 @johnbillion
8 years ago

  • Milestone changed from 4.9 to Future Release

#4 @johnbillion
8 years ago

  • Priority changed from high to normal

#5 @westonruter
8 months ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from new to closed

CSS linting was removed in #44471 via r47305

Note: See TracTickets for help on using tickets.