Skip to content

Commit

Permalink
Remove \\uFEFF from text fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldtse committed Nov 20, 2020
1 parent 1d590cf commit f777f00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/iev/termbase/term_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ def self.build_from(data, indices)
attr_reader :data, :indices

def find_value_for(key)
data.fetch(indices[key], nil)
# Some IEV fields have the string `\uFEFF` polluting them
data.fetch(indices[key], nil).tap do |val|
val ? val.gsub(/\uFEFF/, "") : nil
end
end

def flesh_date(incomplete_date)
Expand Down

0 comments on commit f777f00

Please sign in to comment.