Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

Fix: Replace dangerouslySetInnerHTML with TipTapContentViewer

Khuram Niaz165aff3b7080
diff --git a/src/components/questions/QuestionCard.tsx b/src/components/questions/QuestionCard.tsx
index 2fdfebf..d8f19fb 100644
--- a/src/components/questions/QuestionCard.tsx
+++ b/src/components/questions/QuestionCard.tsx
@@ -20,6 +20,7 @@ import {
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
+import { TipTapContentViewer } from "@/components/TipTapContentViewer";
type QuestionCardProps = {
question: Question;
@@ -87,15 +88,15 @@ export function QuestionCard({
</div>
{hasAnswer && (
- <div
- className="mt-2 text-sm text-muted-foreground prose prose-sm max-w-none dark:prose-invert"
- dangerouslySetInnerHTML={{
- __html:
+ <div className="mt-2 text-sm text-muted-foreground prose prose-sm max-w-none dark:prose-invert">
+ <TipTapContentViewer
+ content={
expanded || !isLongAnswer
? question.answer!
- : truncateHtml(question.answer!, 300),
- }}
- />
+ : truncateHtml(question.answer!, 300)
+ }
+ />
+ </div>
)}
{question.tags && question.tags.length > 0 && (