Skip to content

Add configuration for text viewer#568

Open
ajolipa wants to merge 2 commits intodevelopfrom
RB-html-viewer
Open

Add configuration for text viewer#568
ajolipa wants to merge 2 commits intodevelopfrom
RB-html-viewer

Conversation

@ajolipa
Copy link
Copy Markdown
Contributor

@ajolipa ajolipa commented Feb 26, 2026

In this PR

Adds the ability to configure an HTML viewer for detail pages, which will fetch the given URL (based on a configured base_url and a FairData field containing a path for each record) and extract a tei-text element from it to display at the top of the detail page.
image

Notes and questions

  • Obviously grabbing HTML from some user-configured thing and injecting it into the page is generally frowned upon. I attempted using sanitize-html (https://www.npmjs.com/package/sanitize-html), but of course the TEI has all sorts of non-standard tags, so I had to just tell it to allow all tags and attributes (in theory we could pass it a list, but constructing that list seems pretty involved). It then gave me console warnings about <script> and <style> being allowed, so I just brute-forced those two out. But I don't feel confident that this doesn't leave open some sort of vulnerability, although it might just not be worth worrying about more than I already have.
  • I made the assumption that the XML we want to display will come to us with exactly one <tei-text> element -- is that a safe assumption?
  • Definitely open to feedback on the exact layout/design; this is just a super basic implementation mirroring what we did for EditionCrafter.

@ajolipa ajolipa requested review from blms and camdendotlol February 26, 2026 20:45
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for gbof-c19nyc-staging ready!

Name Link
🔨 Latest commit 88ae689
🔍 Latest deploy log https://app.netlify.com/projects/gbof-c19nyc-staging/deploys/69a10a2491013f00083e94cf
😎 Deploy Preview https://deploy-preview-568--gbof-c19nyc-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for pss-scavenger-hunt ready!

Name Link
🔨 Latest commit 88ae689
🔍 Latest deploy log https://app.netlify.com/projects/pss-scavenger-hunt/deploys/69a10a2406f7780008238255
😎 Deploy Preview https://deploy-preview-568--pss-scavenger-hunt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for juel-ancestry ready!

Name Link
🔨 Latest commit 88ae689
🔍 Latest deploy log https://app.netlify.com/projects/juel-ancestry/deploys/69a10a24d1bf2a00080fb891
😎 Deploy Preview https://deploy-preview-568--juel-ancestry.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for padp-staging ready!

Name Link
🔨 Latest commit 88ae689
🔍 Latest deploy log https://app.netlify.com/projects/padp-staging/deploys/69a10a24bbd5cc00088e84c9
😎 Deploy Preview https://deploy-preview-568--padp-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for libertos ready!

Name Link
🔨 Latest commit 88ae689
🔍 Latest deploy log https://app.netlify.com/projects/libertos/deploys/69a10a249fc82d0007619a04
😎 Deploy Preview https://deploy-preview-568--libertos.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for juel-life ready!

Name Link
🔨 Latest commit 88ae689
🔍 Latest deploy log https://app.netlify.com/projects/juel-life/deploys/69a10a241d4cdf000711fa04
😎 Deploy Preview https://deploy-preview-568--juel-life.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for universities-studying-slavery ready!

Name Link
🔨 Latest commit 88ae689
🔍 Latest deploy log https://app.netlify.com/projects/universities-studying-slavery/deploys/69a10a24de28c200080b2595
😎 Deploy Preview https://deploy-preview-568--universities-studying-slavery.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for juel-staging ready!

Name Link
🔨 Latest commit 88ae689
🔍 Latest deploy log https://app.netlify.com/projects/juel-staging/deploys/69a10a24af76e50008d5dc45
😎 Deploy Preview https://deploy-preview-568--juel-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for gamepossible ready!

Name Link
🔨 Latest commit 88ae689
🔍 Latest deploy log https://app.netlify.com/projects/gamepossible/deploys/69a10a2403ea450008d54353
😎 Deploy Preview https://deploy-preview-568--gamepossible.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2026

Deploy Preview for registro-project ready!

Name Link
🔨 Latest commit 88ae689
🔍 Latest deploy log https://app.netlify.com/projects/registro-project/deploys/69a10a24e025660008d776fb
😎 Deploy Preview https://deploy-preview-568--registro-project.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ajolipa ajolipa linked an issue Feb 26, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add document viewer for TEI documents

1 participant