Make WordPress Core


Ignore:
Timestamp:
08/26/2025 09:06:43 PM (12 months ago)
Author:
TimothyBlynJacobs
Message:

Formatting: Add 'white-space' as an allowed KSES CSS attribute.

The 'white-space' attribute is safe, has wide browser support, and is useful.

Props sukhendu2002, mukesh27, whyisjake..
Fixes #51707.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/kses.php

    r60616 r60671  
    11811181                                'expected' => 'object-fit: cover',
    11821182                        ),
     1183                        // `white-space` introduced in 6.9.0.
     1184                        array(
     1185                                'css'      => 'white-space: nowrap',
     1186                                'expected' => 'white-space: nowrap',
     1187                        ),
     1188                        array(
     1189                                'css'      => 'white-space: pre',
     1190                                'expected' => 'white-space: pre',
     1191                        ),
     1192                        array(
     1193                                'css'      => 'white-space: pre-wrap',
     1194                                'expected' => 'white-space: pre-wrap',
     1195                        ),
     1196                        array(
     1197                                'css'      => 'white-space: pre-line',
     1198                                'expected' => 'white-space: pre-line',
     1199                        ),
    11831200                        // Expressions are not allowed.
    11841201                        array(
Note: See TracChangeset for help on using the changeset viewer.