Make WordPress Core

Changeset 10492


Ignore:
Timestamp:
02/04/2009 12:04:29 AM (16 years ago)
Author:
azaozz
Message:

Fix single quote problems in LJ importer, props beaulebens, fixes #8999

File:
1 edited

Legend:

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

    r10475 r10492  
    235235    }
    236236   
    237     function unhtmlentities($string) { // From php.net for < 4.3 compat
    238         $trans_tbl = get_html_translation_table(HTML_ENTITIES);
    239         $trans_tbl = array_flip($trans_tbl);
    240         return strtr($string, $trans_tbl);
    241     }
    242    
    243237    function import_posts() {
    244238        $total           = (int) get_option( 'ljapi_total' );
     
    584578        preg_match( '|<body>(.*)</body>|is', $comment, $matches );
    585579        $comment_content = !empty( $comment_subject ) ? $comment_subject . "\n\n" . $matches[1] : $matches[1];
    586         $comment_content = $this->unhtmlentities( $comment_content );
     580        $comment_content = html_entity_decode( $comment_content );
     581        $comment_content = str_replace( '&apos;', "'", $comment_content );
    587582        $comment_content = wpautop( $comment_content );
    588583        $comment_content = str_replace( '<br>', '<br />', $comment_content );
Note: See TracChangeset for help on using the changeset viewer.