mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Improve handling of invalid characters in uploaded CSV files
This commit is contained in:
@@ -13,6 +13,6 @@ class UploadSanitizer
|
||||
private
|
||||
|
||||
def strip_bom_character
|
||||
@data.gsub("\xEF\xBB\xBF".force_encoding("UTF-8"), '')
|
||||
@data.scrub.gsub("\xEF\xBB\xBF".force_encoding("UTF-8"), '')
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user