Repository navigation
fix: email formatting and links - #6
Merged
Merged
Conversation
connykaelinvisol
commented
Oct 7, 2026
Contributor
- Format dates as dd.mm.yyyy and keep line breaks in form e-mails
- Resolve node:// and asset:// links in e-mail body and message action text
A Field.Date submits an ISO date string (yyyy-mm-dd), so FormService::stringify() returned it verbatim and the existing DateTime -> d.m.Y branch was never reached. Detect an exact ISO date and reformat it to d.m.Y (rejecting impossible dates so they are not silently rolled over), leaving every other string untouched. User line breaks (e.g. from a textarea) were flattened because the value was injected raw into the HTML mail. Escape the value and nl2br() it so the breaks survive into the HTML part; Html2Text turns the <br> back into newlines for the plaintext part. This also closes an escaping gap in getAllFormValuesHtml(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The headless submit path reads the Email body and Message action properties directly in PHP, bypassing the Content API's URI conversion that handles every other rich-text property. Internal Neos links therefore reached the recipient as raw asset://<uuid> / node://<uuid> strings. Resolve them in FormApiController via the already-injected LinkingService, reusing the same pattern as Networkteam.Neos.ContentApi's PropertiesImplementation and the Redirect action: absolute URLs for the e-mail body (relative links are useless in a mail), relative for the on-site Message. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PHPStan narrows the scheme capture group of PATTERN_SUPPORTED_URIS to 'node'|'asset', so the explicit 'asset' match arm reads as always-true and the default as dead code (match.alwaysTrue). Use an if/else instead; the else branch is the asset case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.