diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index 8c77d167a4..86754dc27b 100644
|
a
|
b
|
function esc_textarea( $text ) {
|
| 4734 | 4734 | function esc_xml( $text ) { |
| 4735 | 4735 | $safe_text = wp_check_invalid_utf8( $text ); |
| 4736 | 4736 | |
| | 4737 | // Strip invalid XML characters. |
| | 4738 | $is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ); |
| | 4739 | if ( $is_utf8 ) { |
| | 4740 | $safe_text = preg_replace( |
| | 4741 | '/[^\x{9}\x{A}\x{D}\x{20}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]/u', |
| | 4742 | '', |
| | 4743 | $safe_text |
| | 4744 | ); |
| | 4745 | } |
| | 4746 | |
| 4737 | 4747 | $cdata_regex = '\<\!\[CDATA\[.*?\]\]\>'; |
| 4738 | 4748 | $regex = <<<EOF |
| 4739 | 4749 | / |