import brand from "../../../brand.json" with { type: "json" }; const escapeXml = (value: string) => value.replace(/[&<>"']/g, character => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'", })[character]!); /** Identity only: draw text in the viewer's font; distribute no platform emoji artwork. */ export function markIconUrl(mark: string): string { const svg = `${escapeXml(mark)}`; // encodeURIComponent leaves apostrophes literal; encode them for either HTML quote style. return `data:image/svg+xml,${encodeURIComponent(svg).replaceAll("'", "%27")}`; }