Open ashleysommer opened 4 months ago
See it in action here: https://vocabs.bdr.gov.au/v/vocab/defn:nrm/emsa-cv:6fd39a33-9c4f-469e-80a5-e76b5d5f04a6
This was inspired by TERN's Fork of Prez-UI here: https://linkeddata.tern.org.au/prez/dawe-cv/v/collection/nrm:f46fcbc6-0660-4e12-bcd4-c5642459b630/nrm:6fd39a33-9c4f-469e-80a5-e76b5d5f04a6
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:
Screenshot of concept description at top of PropsTable page with rendered HTML:
Screenshot of property row object field with type rdf:HTML rendered:
See it in action here: https://vocabs.bdr.gov.au/v/vocab/defn:nrm/emsa-cv:6fd39a33-9c4f-469e-80a5-e76b5d5f04a6