Filter EOT characters from import

This commit is contained in:
Will Bradley 2014-03-12 18:59:31 -07:00
parent ede3baae64
commit 201233f89f

View File

@ -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