From 7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 7 Jan 2020 13:06:14 +0100 Subject: Added wordpress --- .../class-wp-simplepie-sanitize-kses.php | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 srcs/wordpress/wp-includes/class-wp-simplepie-sanitize-kses.php (limited to 'srcs/wordpress/wp-includes/class-wp-simplepie-sanitize-kses.php') diff --git a/srcs/wordpress/wp-includes/class-wp-simplepie-sanitize-kses.php b/srcs/wordpress/wp-includes/class-wp-simplepie-sanitize-kses.php new file mode 100644 index 0000000..2aba304 --- /dev/null +++ b/srcs/wordpress/wp-includes/class-wp-simplepie-sanitize-kses.php @@ -0,0 +1,57 @@ +)/', $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 ( $this->output_encoding !== 'UTF-8' ) { + $data = $this->registry->call( 'Misc', 'change_encoding', array( $data, 'UTF-8', $this->output_encoding ) ); + } + return $data; + } else { + return parent::sanitize( $data, $type, $base ); + } + } +} -- cgit