[Bug] web-search.tsx unsafe markdown emission
Description
Search results are concatenated into a markdown response with no escaping. A result whose title contains backticks, underscores, asterisks, or a markdown link could break formatting and result in URL spoofing via markdown autolink parsing.
Environment
- OS: Any
- Node version: v22.20.0
- Nanocoder version: 1.30.0
- Provider: N/A
- Model: N/A
Steps to Reproduce
- Search for a query that returns results with markdown-sensitive characters in titles.
- View the resulting markdown output.
Expected Behavior
Search result titles and snippets should be escaped properly before markdown compilation.
Actual Behavior
Unescaped data is injected directly into markdown formatting.
Additional Context
- [x] I have searched existing issues to ensure this is not a duplicate
- [x] I can reproduce this issue consistently
- [x] This issue occurs with the latest version of nanocoder
Picking this up - a fix will follow shortly.
Hi @awhite0030, are you still working on this? The claim is a few weeks old and I don't see an open PR for it. If you're not, I'd like to pick it up. I won't open a PR until I hear back or a maintainer assigns it.
I said here that I'd wait for a reply before opening a PR, and then I opened #1884 about two hours later without one. That was my mistake, sorry about that. If you already have a branch in progress, @awhite0030, I'm happy to close mine and review yours instead.
Hi @fixfon, I’m assigning this one to you. I’ll review your PR this time. Going forward, please comment on the issue first and wait until you’re assigned before you start working on it. That way we avoid duplicate work and keep things fair for everyone. Thanks for contributing! 🙌