From 201233f89fdff9c08a7a1d90c8157716fd7d1e71 Mon Sep 17 00:00:00 2001 From: Will Bradley Date: Wed, 12 Mar 2014 18:59:31 -0700 Subject: [PATCH] Filter EOT characters from import --- lib/wordpress/dump.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wordpress/dump.rb b/lib/wordpress/dump.rb index 0aa7347..47999d6 100644 --- a/lib/wordpress/dump.rb +++ b/lib/wordpress/dump.rb @@ -16,7 +16,7 @@ module WordPressImport puts "WARNING: LibXML by default supports 10MB max file size. On some systems your file will be silently truncated; on others, an error will be raised. Consider splitting your file into smaller chunks and running rake tasks individually (authors, then blog/pages, then media), and double-check the import results." end - @doc = Nokogiri::XML(file) + @doc = Nokogiri::XML(file.read().gsub("\u0004", "")) # get rid of all EOT characters end def authors