Ticket #9616: 9616.diff
| File 9616.diff, 5.7 KB (added by Denis-de-Bernardy, 4 years ago) |
|---|
-
wp-includes/default-widgets.php
711 711 $desc = ''; 712 712 $link = ''; 713 713 if ( ! is_wp_error($rss) ) { 714 $desc = attribute_escape(strip_tags( html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));714 $desc = attribute_escape(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset')))); 715 715 if ( empty($title) ) 716 716 $title = htmlentities(strip_tags($rss->get_title())); 717 717 $link = clean_url(strip_tags($rss->get_permalink())); … … 788 788 if ( empty($title) ) 789 789 $title = __('Untitled'); 790 790 791 $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags( html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset')))));791 $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(@html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset'))))); 792 792 $desc = wp_html_excerpt( $desc, 360 ) . ' […]'; 793 793 $desc = wp_specialchars( $desc ); 794 794 -
wp-includes/feed.php
340 340 elseif ( 'atom' == $type ) 341 341 $the_list .= sprintf( '<category scheme="%1$s" term="%2$s" />', attribute_escape( apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ) ), attribute_escape( $cat_name ) ); 342 342 else 343 $the_list .= "\t\t<category><![CDATA[" . html_entity_decode( $cat_name, ENT_COMPAT, get_option('blog_charset') ) . "]]></category>\n";343 $the_list .= "\t\t<category><![CDATA[" . @html_entity_decode( $cat_name, ENT_COMPAT, get_option('blog_charset') ) . "]]></category>\n"; 344 344 } 345 345 346 346 return apply_filters('the_category_rss', $the_list, $type); -
wp-admin/includes/dashboard.php
800 800 $title = $item->get_title(); 801 801 $title = wp_specialchars( $title ); 802 802 803 $description = wp_specialchars( strip_tags( html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset'))) );803 $description = wp_specialchars( strip_tags(@html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset'))) ); 804 804 805 805 $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . 806 806 '&TB_iframe=true&width=600&height=800'; -
wp-admin/import/livejournal.php
576 576 // Get the body and HTMLize it 577 577 preg_match( '|<body>(.*)</body>|is', $comment, $matches ); 578 578 $comment_content = !empty( $comment_subject ) ? $comment_subject . "\n\n" . $matches[1] : $matches[1]; 579 $comment_content = html_entity_decode( $comment_content);579 $comment_content = @html_entity_decode( $comment_content, ENT_COMPAT, get_option('blog_charset') ); 580 580 $comment_content = str_replace( ''', "'", $comment_content ); 581 581 $comment_content = wpautop( $comment_content ); 582 582 $comment_content = str_replace( '<br>', '<br />', $comment_content ); -
wp-admin/import/blogger.php
437 437 if ( count( $matches[1] ) ) 438 438 foreach ( $matches[1] as $match ) 439 439 if ( preg_match('/rel=.previous./', $match) ) 440 $query = html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') );440 $query = @html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') ); 441 441 442 442 if ( $query ) { 443 443 parse_str($query, $q); … … 495 495 if ( count( $matches[1] ) ) 496 496 foreach ( $matches[1] as $match ) 497 497 if ( preg_match('/rel=.previous./', $match) ) 498 $query = html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') );498 $query = @html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') ); 499 499 500 500 parse_str($query, $q); 501 501 … … 545 545 } 546 546 547 547 $post_date = $this->convert_date( $entry->published ); 548 $post_content = trim( addslashes( $this->no_apos( html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ) );548 $post_content = trim( addslashes( $this->no_apos( @html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ) ); 549 549 $post_title = trim( addslashes( $this->no_apos( $this->min_whitespace( $entry->title ) ) ) ); 550 550 $post_status = isset( $entry->draft ) ? 'draft' : 'publish'; 551 551 … … 600 600 $comment_author = addslashes( $this->no_apos( strip_tags( (string) $matches[1] ) ) ); 601 601 $comment_author_url = addslashes( $this->no_apos( strip_tags( (string) $matches[2] ) ) ); 602 602 $comment_date = $this->convert_date( $entry->updated ); 603 $comment_content = addslashes( $this->no_apos( html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) );603 $comment_content = addslashes( $this->no_apos( @html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ); 604 604 605 605 // Clean up content 606 606 $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content);
