diff --git a/src/components/post/post-desktop/post-desktop.tsx b/src/components/post/post-desktop/post-desktop.tsx index 4e1db8a1..d23a0b06 100644 --- a/src/components/post/post-desktop/post-desktop.tsx +++ b/src/components/post/post-desktop/post-desktop.tsx @@ -6,6 +6,7 @@ import { useAccount } from '@plebbit/plebbit-react-hooks'; import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js'; import { getCommentMediaInfo, getDisplayMediaInfoType, getHasThumbnail } from '../../../lib/utils/media-utils'; import { getFormattedDate } from '../../../lib/utils/time-utils'; +import { isValidURL } from '../../../lib/utils/url-utils'; import { isAllView, isPendingPostView, isPostPageView, isSubscriptionsView } from '../../../lib/utils/view-utils'; import useCountLinksInReplies from '../../../hooks/use-count-links-in-replies'; import useReplies from '../../../hooks/use-replies'; @@ -259,7 +260,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies }: PostProps) )} - {link && } + {link && isValidURL(link) && } {!content &&
} {content && } @@ -291,7 +292,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
{'>>'}
- {reply.link && } + {reply.link && isValidURL(reply.link) && } {reply.content && }
diff --git a/src/components/post/post-mobile/post-mobile.tsx b/src/components/post/post-mobile/post-mobile.tsx index c762e9ae..3ad4c4ed 100644 --- a/src/components/post/post-mobile/post-mobile.tsx +++ b/src/components/post/post-mobile/post-mobile.tsx @@ -209,7 +209,7 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
- {content && } + {reply.content && }