mirror of
https://github.com/SomboChea/ui
synced 2024-11-28 08:54:27 +07:00
8 lines
153 B
TypeScript
8 lines
153 B
TypeScript
import parseXSS from 'xss';
|
|
|
|
export function preventXSS(text: string): string {
|
|
const encodedText = parseXSS.filterXSS(text);
|
|
|
|
return encodedText;
|
|
}
|