lib/mods_display/fields/location.rb in mods_display-1.0.0 vs lib/mods_display/fields/location.rb in mods_display-1.1.0
- old
+ new
@@ -8,13 +8,13 @@
location.children.each do |child|
next unless location_field_keys.include?(child.name.to_sym)
if child.name.to_sym == :url
loc_label = displayLabel(location) || I18n.t('mods_display.location')
- value = "<a href='#{child.text}'>#{(displayLabel(child) || child.text).gsub(/:$/, '')}</a>"
+ value = "<a href='#{element_text(child)}'>#{(displayLabel(child) || element_text(child)).gsub(/:$/, '')}</a>"
else
loc_label = location_label(child) || displayLabel(location) || I18n.t('mods_display.location')
- value = child.text
+ value = element_text(child)
end
return_fields << ModsDisplay::Values.new(
label: loc_label || displayLabel(location) || I18n.t('mods_display.location'),
values: [value]
)