Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render property fields with type rdf:HTML #170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ashleysommer
Copy link
Contributor

@ashleysommer ashleysommer commented Jul 2, 2024

Fixes issues with displaying TERN Controlled Vocabularies and TERN Concept Schemes, that make heavy use of HTML-formatted fields in the vocabs and concepts.

Detect property rows with type rdf:HTML and render them directly in the dom.

Use dom-purify (vue-dom-purify Vue plugin) to sanitize the HTML before rendering, to prevent JS injection and other similar exploits.

Screenshot before fixes:
image

Screenshot of concept description at top of PropsTable page with rendered HTML:
Screenshot_20240702_132130

Screenshot of property row object field with type rdf:HTML rendered:
Screenshot_20240702_132211

See it in action here: https://vocabs.bdr.gov.au/v/vocab/defn:nrm/emsa-cv:6fd39a33-9c4f-469e-80a5-e76b5d5f04a6

…he dom.

Use dom-purify (vue-dom-purify Vue plugin) to sanitize the HTML before rendering, to prevent JS injection and other similar exploits.
@ashleysommer
Copy link
Contributor Author

ashleysommer commented Jul 2, 2024

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.

1 participant