From a415c29efee45520ae252d2aa28f1083a521cd7b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 09:56:49 +0200 Subject: Adding upstream version 6.4.3+dfsg1. Signed-off-by: Daniel Baumann --- wp-includes/class-wp-simplepie-sanitize-kses.php | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 wp-includes/class-wp-simplepie-sanitize-kses.php (limited to 'wp-includes/class-wp-simplepie-sanitize-kses.php') diff --git a/wp-includes/class-wp-simplepie-sanitize-kses.php b/wp-includes/class-wp-simplepie-sanitize-kses.php new file mode 100644 index 0000000..c300cf2 --- /dev/null +++ b/wp-includes/class-wp-simplepie-sanitize-kses.php @@ -0,0 +1,56 @@ +)/', $data ) ) { + $type |= SIMPLEPIE_CONSTRUCT_HTML; + } else { + $type |= SIMPLEPIE_CONSTRUCT_TEXT; + } + } + if ( $type & SIMPLEPIE_CONSTRUCT_BASE64 ) { + $data = base64_decode( $data ); + } + if ( $type & ( SIMPLEPIE_CONSTRUCT_HTML | SIMPLEPIE_CONSTRUCT_XHTML ) ) { + $data = wp_kses_post( $data ); + if ( 'UTF-8' !== $this->output_encoding ) { + $data = $this->registry->call( 'Misc', 'change_encoding', array( $data, 'UTF-8', $this->output_encoding ) ); + } + return $data; + } else { + return parent::sanitize( $data, $type, $base ); + } + } +} -- cgit v1.2.3