[wp-trac] [WordPress Trac] #61052: WP_KSES data attributes: Allow double dash

WordPress Trac noreply at wordpress.org
Fri Apr 26 08:15:37 UTC 2024


#61052: WP_KSES data attributes: Allow double dash
--------------------------------------+------------------------------
 Reporter:  cbravobernal              |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  General                   |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by gziolo):

 In this case, it would be easier to start with a very specific expectation
 that covers only the syntax allowed for directives:
 - attribute name prefixed with `data-wp-`
 - attribute name contains only a-z, 0-9 characters, single dash `-`, and
 double dash `--`

 - value should contain one of `state`, `context`, `actions`, `callbacks`
 - value can start with `!`
 - value can be prefixed with a namespace, not sure what is allowed
 - value can only contain a-Z, 0-9, `:`, `.`

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


More information about the wp-trac mailing list