mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
Merge branch 'main' into chat-prefix
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import DOMPurify from 'dompurify';
|
||||
|
||||
export const SanitizeHtml = (html: string): string =>
|
||||
{
|
||||
return DOMPurify.sanitize(html, {
|
||||
ALLOWED_TAGS: [ 'b', 'i', 'u', 'br', 'span', 'div', 'p', 'a', 'strong', 'em', 'img' ],
|
||||
ALLOWED_ATTR: [ 'href', 'target', 'class', 'style', 'src', 'alt' ],
|
||||
ALLOW_DATA_ATTR: false
|
||||
});
|
||||
};
|
||||
@@ -15,6 +15,7 @@ export * from './PrefixUtils';
|
||||
export * from './ProductImageUtility';
|
||||
export * from './Randomizer';
|
||||
export * from './RoomChatFormatter';
|
||||
export * from './SanitizeHtml';
|
||||
export * from './SetLocalStorage';
|
||||
export * from './SoundNames';
|
||||
export * from './WindowSaveOptions';
|
||||
|
||||
Reference in New Issue
Block a user