UNPKG

@shipengine/connect-order-source-api

Version:

This is the typescript/javascript definitions for the order source api

157 lines 4.87 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sanitizePackingSlipTemplate = void 0; const tslib_1 = require("tslib"); const sanitize_html_1 = tslib_1.__importDefault(require("sanitize-html")); const config = { allowVulnerableTags: true, allowedTags: [ 'style', 'a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blockquote', 'br', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'dd', 'del', 'details', 'div', 'dl', 'dt', 'em', 'font', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'i', 'img', 'ins', 'li', 'mark', 'nav', 'ol', 'p', 'pre', 's', 'section', 'small', 'span', 'sub', 'sup', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'u', 'ul', 'video', 'strike', ], allowedAttributes: { a: ['style', 'class', 'id', 'target', 'href', 'title'], abbr: ['style', 'class', 'id', 'title'], address: ['style', 'class', 'id'], area: ['style', 'class', 'id', 'shape', 'coords', 'href', 'alt'], article: ['style', 'class', 'id'], aside: ['style', 'class', 'id'], audio: ['style', 'class', 'id', 'autoplay', 'controls', 'loop', 'preload', 'src'], b: ['style', 'class', 'id'], bdi: ['style', 'class', 'id', 'dir'], bdo: ['style', 'class', 'id', 'dir'], big: ['style', 'class', 'id'], blockquote: ['style', 'class', 'id', 'cite'], br: ['style', 'class', 'id'], caption: ['style', 'class', 'id'], center: ['style', 'class', 'id'], cite: ['style', 'class', 'id'], code: ['style', 'class', 'id'], col: ['style', 'class', 'id', 'align', 'valign', 'span', 'width'], colgroup: ['style', 'class', 'id', 'align', 'valign', 'span', 'width'], dd: ['style', 'class', 'id'], del: ['style', 'class', 'id', 'datetime'], details: ['style', 'class', 'id', 'open'], div: ['style', 'class', 'id', 'align'], dl: ['style', 'class', 'id'], dt: ['style', 'class', 'id'], em: ['style', 'class', 'id'], font: ['style', 'class', 'id', 'color', 'size', 'face'], footer: ['style', 'class', 'id'], h1: ['style', 'class', 'id'], h2: ['style', 'class', 'id'], h3: ['style', 'class', 'id'], h4: ['style', 'class', 'id'], h5: ['style', 'class', 'id'], h6: ['style', 'class', 'id'], header: ['style', 'class', 'id'], hr: ['style', 'class', 'id'], i: ['style', 'class', 'id'], img: ['style', 'class', 'id', 'src', 'alt', 'title', 'width', 'height'], ins: ['style', 'class', 'id', 'datetime'], li: ['style', 'class', 'id'], mark: ['style', 'class', 'id'], nav: ['style', 'class', 'id'], ol: ['style', 'class', 'id'], p: ['style', 'class', 'id'], pre: ['style', 'class', 'id'], s: ['style', 'class', 'id'], section: ['style', 'class', 'id'], small: ['style', 'class', 'id'], span: ['style', 'class', 'id'], sub: ['style', 'class', 'id'], sup: ['style', 'class', 'id'], strong: ['style', 'class', 'id'], table: ['style', 'class', 'id', 'width', 'border', 'align', 'valign'], tbody: ['style', 'class', 'id', 'align', 'valign'], td: ['style', 'class', 'id', 'width', 'rowspan', 'colspan', 'align', 'valign'], tfoot: ['style', 'class', 'id', 'align', 'valign'], th: ['style', 'class', 'id', 'width', 'rowspan', 'colspan', 'align', 'valign'], thead: ['style', 'class', 'id', 'align', 'valign'], tr: ['style', 'class', 'id', 'rowspan', 'align', 'valign'], tt: ['style', 'class', 'id'], u: ['style', 'class', 'id'], ul: ['style', 'class', 'id'], video: [ 'style', 'class', 'id', 'autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', ], strike: ['style', 'class', 'id'], }, }; const sanitizePackingSlipTemplate = (html) => { return (0, sanitize_html_1.default)(html, config); }; exports.sanitizePackingSlipTemplate = sanitizePackingSlipTemplate; //# sourceMappingURL=sanitize-packing-slip-template.js.map