Skip to content

Fix markdown-unsafe fallback in TurnCard.tsx #809

@manavgup

Description

@manavgup

Problem

There's a known TODO in the codebase that needs to be addressed:

Location: apps/web/src/components/ask/TurnCard.tsx:255

Issue: Markdown-unsafe fallback paths when slicing content

Context

The current implementation has unsafe markdown handling in fallback code paths that could lead to rendering issues or XSS vulnerabilities.

Action Required

  • Review the markdown slicing logic in TurnCard component
  • Implement safe markdown handling for all code paths
  • Add tests to verify markdown safety
  • Remove the TODO comment once fixed

Acceptance Criteria

  • Markdown slicing is safe in all code paths
  • No XSS vulnerabilities
  • Tests added to verify safety
  • TODO comment removed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions