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( '