Changeset 46900 for branches/5.3/src/wp-includes/formatting.php
- Timestamp:
- 12/12/2019 06:10:56 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.3/src/wp-includes/formatting.php
r46898 r46900 4904 4904 4905 4905 /** 4906 * Remove non-allowable HTML from parsed block attribute values when filtering 4907 * in the post context. 4908 * 4909 * @since 5.3.1 4910 * 4911 * @param string $string Content to be run through KSES. 4912 * @param array[]|string $allowed_html An array of allowed HTML elements 4913 * and attributes, or a context name 4914 * such as 'post'. 4915 * @param string[] $allowed_protocols Array of allowed URL protocols. 4916 * @return string Filtered text to run through KSES. 4917 */ 4918 function wp_pre_kses_block_attributes( $string, $allowed_html, $allowed_protocols ) { 4919 /* 4920 * `filter_block_content` is expected to call `wp_kses`. Temporarily remove 4921 * the filter to avoid recursion. 4922 */ 4923 remove_filter( 'pre_kses', 'wp_pre_kses_block_attributes', 10 ); 4924 $string = filter_block_content( $string, $allowed_html, $allowed_protocols ); 4925 add_filter( 'pre_kses', 'wp_pre_kses_block_attributes', 10, 3 ); 4926 4927 return $string; 4928 } 4929 4930 /** 4906 4931 * WordPress implementation of PHP sprintf() with filters. 4907 4932 *
Note: See TracChangeset
for help on using the changeset viewer.