Skip to content

Commit

Permalink
Merge pull request #84 from mlibrary/bugfix-amersand-in-ht-source
Browse files Browse the repository at this point in the history
Fix Ampersand problem in HT source
  • Loading branch information
niquerio authored Jun 10, 2024
2 parents 39754db + 8e2ff19 commit e4c5b00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion umich_catalog_indexing/indexers/umich_alma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
require "ht_traject/ht_hathifiles"
HathiTrust::HathiFiles
end
S.logger.info(HathiFiles)

libLocInfo = Traject::TranslationMap.new("umich/libLocInfo")
electronic_collections = Traject::TranslationMap.new("umich/electronic_collections")
Expand Down Expand Up @@ -70,7 +71,7 @@
item[:rights] = f["r"]
item[:description] = f["z"]
item[:collection_code] = f["c"]
item[:source] = cc_to_of[f["c"].downcase]
item[:source] = CGI.unescapeHTML(cc_to_of[f["c"].downcase])
item[:access] = !!(item[:rights] =~ /^(pd|world|ic-world|cc|und-world)/)
# item[:status] = statusFromRights(item[:rights], etas_status)
item[:status] = statusFromRights(item[:rights])
Expand Down
2 changes: 1 addition & 1 deletion umich_catalog_indexing/lib/ht_traject/ht_hathifiles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def self.get_hf_info(oclc_nums, bib_nums)

query(bib_nums: bib_nums, oclc_nums: oclc_nums).each do |r|
hf_hash[r[:id]] = r
hf_hash[r[:id]]["source"] = CC_TO_OF[r[:collection_code].downcase]
hf_hash[r[:id]]["source"] = CGI.unescapeHTML(CC_TO_OF[r[:collection_code].downcase])
end

hf_hash.values
Expand Down

0 comments on commit e4c5b00

Please sign in to comment.