UNPKG

rjweb-server

Version:

Easy and Robust Way to create a Web Server with Many Easy-to-use Features in NodeJS

20 lines (19 loc) 473 B
export type HTMLContent = string | number | boolean | undefined; /** * Parse HTML Content to remove XSS (if used properly) * @example * ``` * const userInput = '<script>alert("OOps")</script>' * * const insecure = ` * <p>Message:</p> * <p>${userInput}</p> * ` * * const secure = html` * <p>Message:</p> * <p>${userInput}</p> * ` * ``` * @since 8.7.0 */ export default function html(parts: TemplateStringsArray, ...variables: HTMLContent[]): string;