/**
* Sanitizes HTML content to prevent XSS attacks.
*/
export declare class ContentSanitizer {
/** Custom safe tags */
private readonly customSafeTags;
/** Custom safe attributes */
private readonly customSafeAttributes;
/**
* Creates a new ContentSanitizer.
* @param options - Sanitizer options
*/
constructor(options?: {
additionalTags?: string[];
additionalAttributes?: string[];
});
/**
* Sanitizes HTML content.
* @param html - HTML to sanitize
* @returns Sanitized HTML
*/
sanitize(html: string): string;
/**
* Sanitizes plain text (escape HTML).
* @param text - Text to sanitize
* @returns Escaped text
*/
sanitizeText(text: string): string;
/**
* Validates content against dangerous patterns.
* @param content - Content to validate
* @returns Whether content is safe
*/
validate(content: string): boolean;
/**
* Sanitizes HTML using DOM parsing.
* @param html - HTML to sanitize
* @returns Sanitized HTML
*/
private sanitizeWithDOM;
/**
* Recursively sanitizes a DOM node.
* @param node - Node to sanitize
*/
private sanitizeNode;
/**
* Sanitizes CSS style content using allowlist approach.
*/
private sanitizeStyle;
/**
* Checks if a CSS value contains dangerous patterns.
*/
private containsDangerousCSSValue;
}