Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/controllers/concerns/hyrax/works_controller_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ def iiif_manifest_builder

def iiif_manifest_presenter
IiifManifestPresenter.new(search_result_document(id: params[:id])).tap do |p|
p.hostname = request.base_url
# Have to force the encoding of base_url to UTF8 because Loofah will strip out ASCII-8BIT strings in Hyrax::ManifestBuilderService#deep_sanitize
p.hostname = request.base_url.force_encoding('UTF-8')
p.ability = current_ability
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/features/iiif_manifest_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
visit "/concern/generic_works/#{work.id}/manifest"
manifest_json = JSON.parse(page.body)

expect(manifest_json['@id']).to match "http://.*/concern/monographs/#{work.id}/manifest"
expect(manifest_json['label']).to eq 'Comet in Moominland'
expect(manifest_json['description']).to eq 'a novel about moomins'

Expand Down
Loading