diff --git a/html-importer.php b/html-importer.php index 1871864..739caa7 100644 --- a/html-importer.php +++ b/html-importer.php @@ -227,7 +227,7 @@ function clean_html( $string, $allowtags = NULL, $allowattributes = NULL ) { $string = preg_replace( "/<[^\/>]*>( [\s]? )*<\/[^>]*>/", ' ', $string ); // get rid of remaining newlines; basic HTML cleanup $string = str_replace( ' ', ' ', $string ); - $string = ereg_replace( "[\n\r]", " ", $string ); + $string = preg_replace( "[\n\r]", " ", $string ); $string = preg_replace_callback( '|<( /?[A-Z]+ )|', create_function( '$match', 'return "<" . strtolower( $match[1] );' ), $string ); $string = str_replace( '
', '
', $string ); $string = str_replace( '
', '
', $string ); @@ -357,7 +357,7 @@ function get_post( $path = '', $placeholder = false ) { $my_post['post_author'] = $options['user']; } else { - set_magic_quotes_runtime( 0 ); + ini_set('magic_quotes_runtime', 0); $doc = new DOMDocument(); $doc->strictErrorChecking = false; // ignore invalid HTML, we hope $doc->preserveWhiteSpace = false;