[wp-trac] [WordPress Trac] #47357: $allowedentitynames could be null

WordPress Trac noreply at wordpress.org
Mon Oct 24 14:47:26 UTC 2022


#47357: $allowedentitynames could be null
-------------------------------------+-----------------------------
 Reporter:  doctorlai                |       Owner:  SergeyBiryukov
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  6.2
Component:  Formatting               |     Version:
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"54672" 54672]:
 {{{
 #!CommitTicketReference repository="" revision="54672"
 KSES: Display a notice if any of the required globals are not set.

 When using the `CUSTOM_TAGS` constant, these global variables should be
 set to arrays:

 * `$allowedposttags`
 * `$allowedtags`
 * `$allowedentitynames`
 * `$allowedxmlentitynames`

 This commit aims to improve developer experience by displaying a more
 helpful message to explain a PHP fatal error further in the code if any of
 these globals are either not set or not an array.

 Note Using `CUSTOM_TAGS` is not recommended and should be considered
 deprecated. The `wp_kses_allowed_html` filter is more powerful and
 supplies context.

 Follow-up to [832], [834], [2896], [13358], [21796], [28845], [43016],
 [48072].

 Props doctorlai, pento, KnowingArt_com, bosconiandynamics, TJNowell,
 ironprogrammer, audrasjb, mukesh27, SergeyBiryukov.
 Fixes #47357.
 }}}

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


More information about the wp-trac mailing list