Short Problem Description

I am using an n8n chatbot embedded in a custom chat UI on a WordPress website.
The bot uses a Vector-Based Retrieval workflow (OpenAI Chat Model + Supabase embeddings).

The issue:
The response coming from the “Question & Answer Retrieve” node contains correct Markdown formatting (\n, lists, bold text, etc.) inside n8n — but once it appears in the WordPress chat window, all formatting is lost.

Everything is rendered as one single line, without line breaks, bullet points, or Markdown formatting.

What the screenshots show:

  • In n8n: The output contains correct Markdown with \n

  • In WordPress: Markdown and line breaks are ignored, everything becomes plain inline text

  • The problem happens after the chatbot receives the response, not inside the n8n workflow

Likely cause:
The custom chat UI or WordPress is rendering the message using textContent or escaping Markdown, so line breaks like \n are not displayed.

What I need:
How can I correctly display line breaks and Markdown formatting from the “Question & Answer Retrieve” node inside the WordPress chat UI?