diff --git a/craft/src/components/forms/ContactForm.toHtml.test.ts b/craft/src/components/forms/ContactForm.toHtml.test.ts index d79c413..99b9598 100644 --- a/craft/src/components/forms/ContactForm.toHtml.test.ts +++ b/craft/src/components/forms/ContactForm.toHtml.test.ts @@ -20,5 +20,7 @@ describe('ContactForm.toHtml relay wiring', () => { expect(html).not.toContain('WHP-FORM'); expect(html).toContain('action="/legacy"'); expect(html).not.toContain('_gotcha'); + // Backward-compat: ensure non-relay output is byte-identical (no extra blank lines from honeypot) + expect(html).not.toMatch(/]*>\n\s*\n/); }); }); diff --git a/craft/src/components/forms/ContactForm.tsx b/craft/src/components/forms/ContactForm.tsx index 0955cd9..889de8b 100644 --- a/craft/src/components/forms/ContactForm.tsx +++ b/craft/src/components/forms/ContactForm.tsx @@ -447,9 +447,7 @@ ContactForm.craft = { return { html: `${marker}
- ${honeypot} - ${fieldsHtml} - +${honeypot ? ` ${honeypot}\n` : ''}${fieldsHtml ? ` ${fieldsHtml}\n` : ''}
`, }; };