Skip to content

fix(frontend): harden markdown rendering and allow cross-origin AI links#2240

Merged
topher-lo merged 2 commits intomainfrom
codex/ai-elements-origin-links
Mar 3, 2026
Merged

fix(frontend): harden markdown rendering and allow cross-origin AI links#2240
topher-lo merged 2 commits intomainfrom
codex/ai-elements-origin-links

Conversation

@topher-lo
Copy link
Contributor

@topher-lo topher-lo commented Mar 3, 2026

Summary by cubic

Hardened markdown by trusting only real KaTeX output and stripping inline styles elsewhere. Also enabled cross‑origin links/images and set a default origin to resolve relative URLs.

  • New Features

    • Allow cross‑origin links and images; pass defaultOrigin=https://tracecat.local to all Streamdown instances for path‑relative URLs.
  • Bug Fixes

    • Strip all inline styles outside trusted KaTeX trees; inside KaTeX, allow only a small set of style properties/values and canonicalize them.
    • Extend sanitize schema with MathML/SVG tags and safe attributes; rely on Streamdown’s built‑in KaTeX; add tests for style stripping and filtering.

Written for commit 69fbb94. Summary will update on new commits.

@topher-lo topher-lo added ui Improvements or additions to UI/UX fix Bug fix labels Mar 3, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91fc59fbfe

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@topher-lo topher-lo merged commit 66c710d into main Mar 3, 2026
10 checks passed
@topher-lo topher-lo deleted the codex/ai-elements-origin-links branch March 3, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix ui Improvements or additions to UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant