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

WordPress Trac noreply at wordpress.org
Sat Jul 30 23:38:28 UTC 2022


#47357: $allowedentitynames could be null
--------------------------+----------------------
 Reporter:  doctorlai     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Formatting    |     Version:
 Severity:  normal        |  Resolution:  wontfix
 Keywords:                |     Focuses:
--------------------------+----------------------

Comment (by TJNowell):

 If you do not create the variables at the top of `kses.php` with your
 custom values, yes!

 {{{
 /**
  * Specifies the default allowable HTML tags.
  *
  * Using `CUSTOM_TAGS` is not recommended and should be considered
 deprecated. The
  * {@see 'wp_kses_allowed_html'} filter is more powerful and supplies
 context.
  *
  * @see wp_kses_allowed_html()
  * @since 1.2.0
  *
  * @var array[]|false Array of default allowable HTML tags, or false to
 use the defaults.
  */
 if ( ! defined( 'CUSTOM_TAGS' ) ) {
         define( 'CUSTOM_TAGS', false );
 }
 }}}

 I'd suggest using the wp_kses_allowed_html filter as the documentation
 suggests.

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


More information about the wp-trac mailing list