Skip to content

Commit

Permalink
Add additional test cases for custom data attribute parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Jun 3, 2024
1 parent 0c1b6f9 commit aa63e2b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/phpunit/tests/kses.php
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,15 @@ public static function data_possible_custom_data_attributes_and_transformed_name
'With Unicode whitespace' => array( "data-\u{2003}", "\u{2003}" ),
'With Emoji' => array( 'data-🐄-pasture', '🐄Pasture' ),
'Brackets and colon' => array( 'data-[wish:granted]', '[wish:granted]' ),

// Pens and Pencils: a collection of interesting combinations of dash and underscore.
'data-pens-and-pencils' => array( 'data-pens-and-pencils', 'pensAndPencils' ),
'data-pens--and--pencils' => array( 'data-pens--and--pencils', 'pens-And-Pencils' ),
'data--pens--and--pencils' => array( 'data--pens--and--pencils', 'Pens-And-Pencils' ),
'data---pens---and---pencils' => array( 'data---pens---and---pencils', '-Pens--And--Pencils' ),
'data-pens-and-pencils-' => array( 'data-pens-and-pencils-', 'pensAndPencils-' ),
'data-pens-and-pencils--' => array( 'data-pens-and-pencils--', 'pensAndPencils--' ),
'data-pens_and_pencils__' => array( 'data-pens_and_pencils__', 'pens_and_pencils__' ),
);
}

Expand Down

0 comments on commit aa63e2b

Please sign in to comment.