Skip to content

Pasting Markdown in Agentflows V2 editor escapes characters and sends corrupted prompt to LLM #5527

@maximusbirkefeld

Description

@maximusbirkefeld

Describe the bug

When pasting Markdown text (e.g., ## Heading) into the instruction/system message field of an Agentflow V2, the editor does not apply the formatting automatically.

Instead of parsing the Markdown, the editor treats the input as raw text and escapes the Markdown characters when sending the payload to the LLM.

The Impact: The LLM receives ## Heading instead of ## Heading. This confuses the model, as it receives broken syntax instead of structured Markdown instructions.

Note: Manually editing the text (e.g., adding a space after pasting) triggers the editor to parse the Markdown correctly, but a direct paste fails.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new Agentflow V2
  • Add a start and agent node
  • Select an LLM
  1. Copy a Markdown string f. e. with headers/lists from an external source (e.g., ## My Task).
  2. Paste it into an Agent's System Message field in Agentflows V2.
  3. Observe that the text in the editor remains looking like plain text (not bold/formatted).
  4. Connect your tracing e.g. Langsmith
  5. Run the flow without editing the text further.
  6. Check the LLM input trace (e.g., in LangSmith or console logs).

Expected behavior

Markdown that is pasted into the Agentflow V2 editor should:

  • not be escaped, and
  • be passed through to the LLM exactly as written,
  • without requiring the user to manually "re-apply" formatting or edit the line.
    Flowise should preserve raw Markdown and send the same text to the LLM that is visible in the editor.

Why this is critical:
For production workflows involving versioning and the management of complex multi-agent systems, manual intervention (e.g., adding a space after pasting) is not a feasible workaround. The system must guarantee that pasted prompts are stored and transmitted exactly as they were copied to ensure consistent behavior across updates and large-scale deployments.

Screenshots

Image Image

Flow

No response

Use Method

None

Flowise Version

3.0.11

Operating System

Windows

Browser

Chrome

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinguiIssues or features related to ui

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions