fix(n8n Form Node): Resolve expressions in HTML fields (#13755)

This commit is contained in:
Michael Kret
2025-03-11 05:40:58 +02:00
committed by GitHub
parent 4fe249580a
commit de23ae5558
5 changed files with 80 additions and 32 deletions

View File

@@ -6,7 +6,7 @@ import {
type IWebhookResponseData,
} from 'n8n-workflow';
import { renderForm, sanitizeHtml } from './utils';
import { renderForm } from './utils';
export const renderFormNode = async (
context: IWebhookFunctions,
@@ -42,12 +42,6 @@ export const renderFormNode = async (
) as string) || 'Submit';
}
for (const field of fields) {
if (field.fieldType === 'html') {
field.html = sanitizeHtml(field.html as string);
}
}
const appendAttribution = context.evaluateExpression(
`{{ $('${trigger?.name}').params.options?.appendAttribution === false ? false : true }}`,
) as boolean;