[wp-trac] [WordPress Trac] #45168: Additional CSS complains of markup inside CSS comments

WordPress Trac noreply at wordpress.org
Tue Nov 24 19:45:58 UTC 2020


#45168: Additional CSS complains of markup inside CSS comments
--------------------------+-----------------------------
 Reporter:  useStrict     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Customize     |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------

Comment (by sabernhardt):

 Most of the PHP validation was replaced in [41376], but the check for the
 existence of an HTML tag (pattern) is still there.
 https://core.trac.wordpress.org/browser/tags/5.5/src/wp-includes/customize
 /class-wp-customize-custom-css-setting.php#L162

 If keeping the tag check in PHP, it would need to make sure all matches to
 that pattern are not inside comments to pass the validation.

 Technically, though, there are workarounds. Currently acceptable methods
 include adding a space after the first angle bracket or replacing the
 angle brackets with Markdown-style inline code syntax.
 {{{
 /* comment with < a > tag */
 /* comment with `a` tag */
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45168#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list