Make WordPress Core


Ignore:
Timestamp:
02/06/2010 07:19:25 AM (17 years ago)
Author:
dd32
Message:

Remove < PHP 4.3 compat functions from importers. Props nacin. Fixes #11636

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/rss.php

    r12789 r12985  
    2929        function footer() {
    3030                echo '</div>';
    31         }
    32 
    33         function unhtmlentities($string) { // From php.net for < 4.3 compat
    34                 $trans_tbl = get_html_translation_table(HTML_ENTITIES);
    35                 $trans_tbl = array_flip($trans_tbl);
    36                 return strtr($string, $trans_tbl);
    3731        }
    3832
     
    8882                        $cat_index = 0;
    8983                        foreach ($categories as $category) {
    90                                 $categories[$cat_index] = $wpdb->escape($this->unhtmlentities($category));
     84                                $categories[$cat_index] = $wpdb->escape( html_entity_decode( $category ) );
    9185                                $cat_index++;
    9286                        }
     
    10498                                // This is for feeds that put content in description
    10599                                preg_match('|<description>(.*?)</description>|is', $post, $post_content);
    106                                 $post_content = $wpdb->escape($this->unhtmlentities(trim($post_content[1])));
     100                                $post_content = $wpdb->escape( html_entity_decode( trim( $post_content[1] ) ) );
    107101                        }
    108102
Note: See TracChangeset for help on using the changeset viewer.