Skip to content

TASK: Add '?' only if needed#94

Open
bstrilziw wants to merge 1 commit intositegeist:1.0from
bstrilziw:feature/mailto-question-mark-only-when-needed
Open

TASK: Add '?' only if needed#94
bstrilziw wants to merge 1 commit intositegeist:1.0from
bstrilziw:feature/mailto-question-mark-only-when-needed

Conversation

@bstrilziw
Copy link
Copy Markdown

Takes care of #77

@mhsdesign mhsdesign self-requested a review September 10, 2025 12:34
Copy link
Copy Markdown
Collaborator

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi thank you:)

this is a regression from #28 - which complained that the space being encoded to + will not show up correct in the mail app.

I suggest to use the following snippet so spaces are correctly encoded as %20 via encodeURIComponent

convertModelToLink: (email:MailToLinkModel) => {
    const query = Object.entries({
            subject: email.subject,
            cc: email.cc,
            bcc: email.bcc,
            body: email.body,
        })
        .filter(([_key, value]) => value != null)
        .map(([key, value]) => `${key}=${encodeURIComponent(value as string)}`)
        .join('&');

    const href = `mailto:${email.recipient}${query ? `?${query}` : ''}`;

    return {href};
},

btw in the version which will be part of Neos 9.1 i already did this

mhsdesign added a commit to neos/neos-ui that referenced this pull request Sep 16, 2025
Replaces sitegeist/Sitegeist.Archaeopteryx#94

Refixes sitegeist/Sitegeist.Archaeopteryx#28 - which complained that the space being encoded to + will not show up correct in the mail app.

Now spaces are correctly encoded as %20 via encodeURIComponent
mhsdesign added a commit to neos/neos-ui that referenced this pull request Oct 30, 2025
Replaces sitegeist/Sitegeist.Archaeopteryx#94

Refixes sitegeist/Sitegeist.Archaeopteryx#28 - which complained that the space being encoded to + will not show up correct in the mail app.

Now spaces are correctly encoded as %20 via encodeURIComponent
mhsdesign added a commit to neos/neos-ui that referenced this pull request Nov 11, 2025
Replaces sitegeist/Sitegeist.Archaeopteryx#94

Refixes sitegeist/Sitegeist.Archaeopteryx#28 - which complained that the space being encoded to + will not show up correct in the mail app.

Now spaces are correctly encoded as %20 via encodeURIComponent
mhsdesign added a commit to neos/neos-ui that referenced this pull request Nov 16, 2025
Replaces sitegeist/Sitegeist.Archaeopteryx#94

Refixes sitegeist/Sitegeist.Archaeopteryx#28 - which complained that the space being encoded to + will not show up correct in the mail app.

Now spaces are correctly encoded as %20 via encodeURIComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants