chore: fix some security issues in markdown (#20639)

This commit is contained in:
Joel
2025-06-04 15:56:29 +08:00
committed by GitHub
parent 006496f24e
commit d22c351221
3 changed files with 13 additions and 13 deletions

View File

@@ -0,0 +1,3 @@
export const isValidUrl = (url: string): boolean => {
return ['http:', 'https:', '//', 'mailto:'].some(prefix => url.startsWith(prefix))
}