[wp-trac] [WordPress Trac] #33924: sanitize_html_class valid characters

WordPress Trac noreply at wordpress.org
Sun Oct 4 02:19:32 UTC 2020


#33924: sanitize_html_class valid characters
-------------------------------------------------+-------------------------
 Reporter:  m-e-h                                |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Formatting                           |     Version:  4.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion has-unit-      |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 From the discussion on #44988:

 @ayeshrajans pointed out the W3 spec does say that class names cannot
 start with a digit, single or double hyphens.
 https://www.w3.org/TR/CSS21/syndata.html#characters

 @ChiefAlchemist also suggested an additional parameter for strict and
 permissive mode

 @davidwebca mentioned with libraries such as tailwind using characters
 outside of the permitted set, this has potential to become a bigger issue.

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


More information about the wp-trac mailing list