Skip to main content

embed_reference

Function embed_reference 

Source
pub fn embed_reference(html: &[u8], href: &str) -> Result<Vec<u8>, Error>
Expand description

Reference an external Manifest Store, as a link element in the document head.

Any existing C2PA manifest elements are removed first. Fails with Error::NoHead if the document has no </head>.

href is written into an attribute verbatim except for &, <, and ", which are escaped. A URI containing those characters is unusual but a document that carries one must still parse.