WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/06/2010 07:19:25 AM (11 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/wordpress.php

    r12657 r12985  
    4242    function footer() {
    4343        echo '</div>';
    44     }
    45 
    46     function unhtmlentities($string) { // From php.net for < 4.3 compat
    47         $trans_tbl = get_html_translation_table(HTML_ENTITIES);
    48         $trans_tbl = array_flip($trans_tbl);
    49         return strtr($string, $trans_tbl);
    5044    }
    5145
     
    451445        $tag_index = 0;
    452446        foreach ($tags as $tag) {
    453             $tags[$tag_index] = $wpdb->escape($this->unhtmlentities(str_replace(array ('<![CDATA[', ']]>'), '', $tag)));
     447            $tags[$tag_index] = $wpdb->escape( html_entity_decode( str_replace(array( '<![CDATA[', ']]>' ), '', $tag ) ) );
    454448            $tag_index++;
    455449        }
     
    460454        $cat_index = 0;
    461455        foreach ($categories as $category) {
    462             $categories[$cat_index] = $wpdb->escape($this->unhtmlentities(str_replace(array ('<![CDATA[', ']]>'), '', $category)));
     456            $categories[$cat_index] = $wpdb->escape( html_entity_decode( str_replace( array( '<![CDATA[', ']]>' ), '', $category ) ) );
    463457            $cat_index++;
    464458        }
Note: See TracChangeset for help on using the changeset viewer.