TAMULib / CAP

MIT License
3 stars 2 forks source link

[D-01275] Metadata edit fails when quote characters (") are already present in the value #138

Closed kaladay closed 4 years ago

kaladay commented 4 years ago

Reduce manipulation of the Triple data on the backend. Use Jena's Triple custom toString(boolean) to safely escape the Triple. Note that the Jena Triple decides not to escape single quotes inside of double-quotes. The internal Jena Triple structure seems to be similar to Turtle in that it doesn't support escaped single-quotes despite the parent standard (RDF Triples) supporting such.

Update Cap Triple toString() to not perform any escaping as the data should already be in the expected format.

Implement and utilize triple validation to validate that the triple from the front-end is safe. The triples from the front-end should already be escaped and so only validation is needed.

The front-end now handles escaping and unescaping as needed.

Add exception and advice for handling/reporting invalid triples.