diff --git a/src/services/llm/tools/note_summarization_tool.ts b/src/services/llm/tools/note_summarization_tool.ts index d29555879..fa389eac0 100644 --- a/src/services/llm/tools/note_summarization_tool.ts +++ b/src/services/llm/tools/note_summarization_tool.ts @@ -172,10 +172,10 @@ export class NoteSummarizationTool implements ToolHandler { text = text .replace(/</g, '<') .replace(/>/g, '>') - .replace(/&/g, '&') .replace(/"/g, '"') .replace(/'/g, "'") - .replace(/ /g, ' '); + .replace(/ /g, ' ') + .replace(/&/g, '&'); // Normalize whitespace text = text.replace(/\s+/g, ' ').trim();