diff options
author | Admin <admin@marx.cafe> | 2022-11-28 01:21:47 -0500 |
---|---|---|
committer | Admin <admin@marx.cafe> | 2022-11-28 01:21:47 -0500 |
commit | 33a6f6db56055d58ee2d24262c4a9abdccdb9679 (patch) | |
tree | fa90bf68c470efddfd48d2e2b57c98ac38647873 | |
parent | ee1101e85cfa178444324e1826ab60969b52969d (diff) |
Replace invalid utf-8 characters in html2md
-rwxr-xr-x | html2md.rb | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -16,7 +16,7 @@ end filename = ARGV[0] file_no_ext = File.basename(filename, File.extname(filename)) -content = File.read(filename) +content = File.read(filename).encode('UTF-8', invalid: :replace, undef: :replace) doc = Nokogiri.parse(content) title = doc.title |