Add configuration for text viewer#568
Open
ajolipa wants to merge 5 commits into
Open
Conversation
✅ Deploy Preview for gbof-c19nyc-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for pss-scavenger-hunt ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for juel-ancestry ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for padp-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
❌ Deploy Preview for libertos failed. Why did it fail? →
|
✅ Deploy Preview for juel-life ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for universities-studying-slavery ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for juel-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
❌ Deploy Preview for gamepossible failed. Why did it fail? →
|
❌ Deploy Preview for registro-project failed. Why did it fail? →
|
camdendotlol
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_urland a FairData field containing a path for each record) and extract atei-textelement from it to display at the top of the detail page.Notes and questions
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.<tei-text>element -- is that a safe assumption?