upstream #1

Merged
jblu merged 1007 commits from upstream into main 2024-11-04 22:35:57 -06:00
Showing only changes of commit a2fde6dc7e - Show all commits

View File

@ -31,7 +31,10 @@ type SocialIconProps = {
}
const SocialIcon = ({ kind, href, size = 8 }: SocialIconProps) => {
if (!href || (kind === 'mail' && !/^mailto:\w+([.-]?\w+)@\w+([.-]?\w+)(.\w{2,3})+$/.test(href)))
if (
!href ||
(kind === 'mail' && !/^mailto:[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(href))
)
return null
const SocialSvg = components[kind]