Skip to content

Fix/web search markdown injection - #1157

Open
OMEE-Y wants to merge 4 commits into
Nano-Collective:mainfrom
OMEE-Y:fix/web-search-markdown-injection
Open

Fix/web search markdown injection#1157
OMEE-Y wants to merge 4 commits into
Nano-Collective:mainfrom
OMEE-Y:fix/web-search-markdown-injection

Conversation

@OMEE-Y

@OMEE-Y OMEE-Y commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

Sanitizes search result content by escaping Markdown-sensitive characters in titles and descriptions, and strips whitespace and angle brackets from URLs. This prevents formatting disruption, markdown injection vulnerabilities, and URL spoofing via autolink breakout.

Fixes #1146

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changeset

  • Added a changeset (pnpm changeset) describing this change for the changelog

Docs-only or internal chores need no changeset (or run pnpm changeset --empty to note that intentionally).

Testing

Automated Tests

  • New features include passing tests in .spec.ts/tsx files
  • All existing tests pass (pnpm test:all completes successfully)
  • Tests cover both success and error scenarios

Manual Testing

  • Tested with Ollama
  • Tested with OpenRouter
  • Tested with OpenAI-compatible API
  • Tested MCP integration (if applicable)

Checklist

  • If this was for an open issue, I was assigned to it
  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)
  • Appropriate logging added using structured logging (see CONTRIBUTING.md)

@github-actions github-actions Bot added the area:tools Tool implementations and tool-calling label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tools Tool implementations and tool-calling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] web-search.tsx unsafe markdown emission

1 participant