Skip to content

Form Ending does not support HTML output #15984

Description

@pemontto

Bug Description

Despite what the docs say at Form Ending#form-ending

Use Show Text to display a final page defined by arbitrary plain text and HTML. Fill in the Text field with the HTML or plain text content you wish to show

It doesn't seem possible to return HTML content. Any HTML tags seem to be stripped, it also seems newlines get inserted at around 74 chars wide when I tried to return a raw JSON blob 🤷‍♂️.

This seems like it never will have worked based on responseText: sanitizeHtml(responseText) in https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/Form/formCompletionUtils.ts#L74

To Reproduce

  1. Add a Form node
  2. Page Type: Form Ending
  3. On n8n Form Submission: Show Text
  4. Add basic HTML in the Text field: <h1>This is a heading</h1>

Expected behavior

The raw input should be returned.

I was hoping I could use the Respond to Webhook node with its Text response which returns the raw response body and ALSO allows setting HTTP headers like content-type where you can e.g. set text/html, application/json, application/xml.

Operating System

Docker container 1.94.1

n8n Version

1.94.1

Node.js Version

Docker container 1.94.1

Database

PostgreSQL

Execution mode

queue

Metadata

Metadata

Assignees

No one assigned

    Labels

    in linearDEPRECATEDteam:nodesIssue is with the Nodes team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions