@@ -8,6 +8,7 @@ import communityBuilds from '../data/community-builds.json';
88import pressArticles from ' ../data/press.json' ;
99import { getPublishedBlogPosts } from ' ../lib/blog' ;
1010import { getCachedXAvatarSrc , getInitialsAvatarSrc } from ' ../lib/avatars' ;
11+ import { sanitizeUrl } from ' ../lib/sanitize-url' ;
1112
1213const blogPosts = await getPublishedBlogPosts ();
1314const [latestPost] = blogPosts ;
@@ -534,7 +535,7 @@ function formatBlogDate(date: Date): string {
534535 <div class =" testimonials-track" >
535536 <div class =" testimonials-row row-1" style ={ ` --duration: ${duration1 }s ` } >
536537 { row1 .map ((t ) => (
537- <a href = { t .url } target = " _blank" rel = " noopener" class = " testimonial-card" tabindex = " -1" >
538+ <a href = { sanitizeUrl ( t .url ) } target = " _blank" rel = " noopener" class = " testimonial-card" tabindex = " -1" >
538539 <img
539540 src = { getCachedXAvatarSrc (t .author , t .author , 88 )}
540541 alt = { t .author }
@@ -551,7 +552,7 @@ function formatBlogDate(date: Date): string {
551552 </div >
552553 <div class =" testimonials-row row-2" style ={ ` --duration: ${duration2 }s ` } >
553554 { row2 .map ((t ) => (
554- <a href = { t .url } target = " _blank" rel = " noopener" class = " testimonial-card" >
555+ <a href = { sanitizeUrl ( t .url ) } target = " _blank" rel = " noopener" class = " testimonial-card" >
555556 <img
556557 src = { getCachedXAvatarSrc (t .author , t .author , 88 )}
557558 alt = { t .author }
@@ -666,7 +667,7 @@ function formatBlogDate(date: Date): string {
666667 />
667668 <div class =" builds-grid" >
668669 { featuredBuilds .map ((build ) => (
669- <a href = { build .href } target = " _blank" rel = " noopener" class = " build-card" >
670+ <a href = { sanitizeUrl ( build .href ) } target = " _blank" rel = " noopener" class = " build-card" >
670671 <div class = " build-card-header" >
671672 <span class = " build-source" >{ build .source } </span >
672673 <span class = " build-open" >Open →</span >
@@ -694,7 +695,7 @@ function formatBlogDate(date: Date): string {
694695 <div class =" press-grid" >
695696 { featuredPress .map ((article ) => (
696697 <a
697- href = { article .url }
698+ href = { sanitizeUrl ( article .url ) }
698699 target = " _blank"
699700 rel = " noopener"
700701 class :list = { [' press-card' , article .featured && ' press-featured' ]}
0 commit comments