Ticket #8999: single-quotes.diff
File single-quotes.diff, 1.2 KB (added by , 16 years ago) |
---|
-
wp-admin/import/livejournal.php
234 234 <?php 235 235 } 236 236 237 function unhtmlentities($string) { // From php.net for < 4.3 compat238 $trans_tbl = get_html_translation_table(HTML_ENTITIES);239 $trans_tbl = array_flip($trans_tbl);240 return strtr($string, $trans_tbl);241 }242 243 237 function import_posts() { 244 238 $total = (int) get_option( 'ljapi_total' ); 245 239 $count = (int) get_option( 'ljapi_count' ); … … 583 577 // Get the body and HTMLize it 584 578 preg_match( '|<body>(.*)</body>|is', $comment, $matches ); 585 579 $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( ''', "'", $comment_content ); 587 582 $comment_content = wpautop( $comment_content ); 588 583 $comment_content = str_replace( '<br>', '<br />', $comment_content ); 589 584 $comment_content = str_replace( '<hr>', '<hr />', $comment_content );