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
commit d22c351221
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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))
}