/** * Security utilities for HTML sanitization. * All DOM writes are sanitized by default to prevent XSS attacks. * * @module bquery/security */ import type { SanitizedHtml } from './trusted-html'; import type { SanitizeOptions } from './types'; export { generateNonce } from './csp'; export { isTrustedTypesSupported } from './trusted-types'; export { trusted } from './trusted-html'; export type { SanitizedHtml, TrustedHtml } from './trusted-html'; /** * Sanitize HTML string, removing dangerous elements and attributes. * Uses Trusted Types when available for CSP compliance. * * @param html - The HTML string to sanitize * @param options - Sanitization options * @returns Sanitized HTML string * * @example * ```ts * const safe = sanitizeHtml('