chore: fix some security issues in markdown (#20639)
This commit is contained in:
parent
006496f24e
commit
d22c351221
3 changed files with 13 additions and 13 deletions
3
web/app/components/base/markdown-blocks/utils.ts
Normal file
3
web/app/components/base/markdown-blocks/utils.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export const isValidUrl = (url: string): boolean => {
|
||||
return ['http:', 'https:', '//', 'mailto:'].some(prefix => url.startsWith(prefix))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue