Skip to content

Invalid embed URL in rc #1439

Description

@LlGC-jop

UV version:

 universalviewer@4.2.0-rc3/4

I'm submitting a:

  • bug report => please fork one of these codesandbox examples with a repro of your issue and include a link to it below
  • feature request => please use the user stories repo
  • support request => Please do not submit support requests here, use stackoverflow

Current behavior:

In rc3/4 of 4.2.0 the embed URL is missing a ? after the # which causes the UV to error

Expected behavior:

Embedded Viewer would work

Steps to reproduce:

  1. Go to universalviewer.dev
  2. Open the share dialog and copy the URL from the embed box
  3. Paste into a new tab
  4. Manually add ? after the # and refresh to see it working

Related code:

In src/content-handlers/iiif/modules/uv-shared-module/BaseExtension.ts#buildEmbedScript()

if ((hashParams?.size ?? 0) > 0) {
  appUri += `#${hashParams.toString()}`;
}

Other information:

Suggested fix:

if ((hashParams?.size ?? 0) > 0) {
  appUri += `#?${hashParams.toString()}`;
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions