mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
added insane to sanitize html
This commit is contained in:
parent
165039c177
commit
b58ddba328
6 changed files with 93 additions and 14 deletions
|
@ -1,4 +1,5 @@
|
|||
import marked from 'marked';
|
||||
import { stripHTMLTags } from '~/utils/stripHTMLTags';
|
||||
|
||||
/**
|
||||
* Cleans youtube urls
|
||||
|
@ -12,8 +13,7 @@ export const formatTextSanitizeYoutube = (text: string): string =>
|
|||
/**
|
||||
* Removes HTML tags
|
||||
*/
|
||||
export const formatTextSanitizeTags = (text: string): string =>
|
||||
text.replace(/</g, '<').replace(/>/g, '>');
|
||||
export const formatTextSanitizeTags = (text: string): string => stripHTMLTags(text);
|
||||
|
||||
/**
|
||||
* Returns clickable usernames
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue