RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix: bad escape \P at position 374 (line 18, column 23) when using th… (#7909)
TeslaZY1239f5afc869
diff --git a/agent/component/template.py b/agent/component/template.pyindex 1b450a251c..b49c51594f 100644--- a/agent/component/template.py+++ b/agent/component/template.py@@ -119,7 +119,10 @@ class Template(ComponentBase):v = json.dumps(v, ensure_ascii=False)except Exception:pass- content = re.sub(r"\{%s\}" % re.escape(n), v, content)+ # Process backslashes in strings, Use Lambda function to avoid escape issues+ if isinstance(v, str):+ v = v.replace("\\", "\\\\")+ content = re.sub(r"\{%s\}" % re.escape(n), lambda match: v, content)content = re.sub(r"(#+)", r" \1 ", content)return Template.be_output(content)