Changeset 46915 for branches/5.0/src/wp-includes/formatting.php
- Timestamp:
- 12/12/2019 06:51:11 PM (6 years ago)
- Location:
- branches/5.0
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/formatting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0
- Property svn:mergeinfo changed
/trunk merged: 46893-46896
- Property svn:mergeinfo changed
-
branches/5.0/src/wp-includes/formatting.php
r45993 r46915 4404 4404 4405 4405 /** 4406 * Remove non-allowable HTML from parsed block attribute values when filtering 4407 * in the post context. 4408 * 4409 * @since 5.3.1 4410 * 4411 * @param string $string Content to be run through KSES. 4412 * @param array[]|string $allowed_html An array of allowed HTML elements 4413 * and attributes, or a context name 4414 * such as 'post'. 4415 * @param string[] $allowed_protocols Array of allowed URL protocols. 4416 * @return string Filtered text to run through KSES. 4417 */ 4418 function wp_pre_kses_block_attributes( $string, $allowed_html, $allowed_protocols ) { 4419 /* 4420 * `filter_block_content` is expected to call `wp_kses`. Temporarily remove 4421 * the filter to avoid recursion. 4422 */ 4423 remove_filter( 'pre_kses', 'wp_pre_kses_block_attributes', 10 ); 4424 $string = filter_block_content( $string, $allowed_html, $allowed_protocols ); 4425 add_filter( 'pre_kses', 'wp_pre_kses_block_attributes', 10, 3 ); 4426 4427 return $string; 4428 } 4429 4430 /** 4406 4431 * WordPress implementation of PHP sprintf() with filters. 4407 4432 *
Note: See TracChangeset
for help on using the changeset viewer.