UNPKG

mirador

Version:

An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.

23 lines (20 loc) 646 B
// Only remove security related tags and attributes. Allow each other. var liberal = {}; // No html at all. Only text will remain. var noHtml = { ALLOWED_TAGS: [] }; // Presentation API 2 suggestion. var iiif = { ALLOWED_ATTR: ['href', 'src', 'alt'], ALLOWED_TAGS: ['a', 'b', 'br', 'i', 'img', 'p', 'span'] }; // Rule set that is used in Mirador 2. var mirador2 = { ALLOWED_ATTR: ['href', 'target', 'src', 'alt', 'dir'], ALLOWED_TAGS: ['a', 'b', 'br', 'i', 'img', 'p', 'span', 'strong', 'em', 'ul', 'ol', 'li'] }; var htmlRules = { iiif: iiif, liberal: liberal, mirador2: mirador2, noHtml: noHtml }; export default htmlRules;