~canonical-sysadmins/wordpress/5.1

« back to all changes in this revision

Viewing changes to wp-includes/class-wp-simplepie-sanitize-kses.php

  • Committer: Barry Price
  • Date: 2019-02-22 03:51:26 UTC
  • mfrom: (1.2.12 upstream)
  • Revision ID: barry.price@canonical.com-20190222035126-o28k38qs8jfyjsxt
Merge WP5.1 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        public function sanitize( $data, $type, $base = '' ) {
36
36
                $data = trim( $data );
37
37
                if ( $type & SIMPLEPIE_CONSTRUCT_MAYBE_HTML ) {
38
 
                        if (preg_match('/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>)/', $data)) {
 
38
                        if ( preg_match( '/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>)/', $data ) ) {
39
39
                                $type |= SIMPLEPIE_CONSTRUCT_HTML;
40
 
                        }
41
 
                        else {
 
40
                        } else {
42
41
                                $type |= SIMPLEPIE_CONSTRUCT_TEXT;
43
42
                        }
44
43
                }