Skip to content

fix(api): add spacing around human input form urls#34189

Draft
Theysua wants to merge 1 commit intolanggenius:mainfrom
Theysua:fix/human-input-url-separator
Draft

fix(api): add spacing around human input form urls#34189
Theysua wants to merge 1 commit intolanggenius:mainfrom
Theysua:fix/human-input-url-separator

Conversation

@Theysua
Copy link
Copy Markdown
Contributor

@Theysua Theysua commented Mar 27, 2026

When {{#url#}} is adjacent to non-whitespace text in a Human Input email delivery body, the rendered URL was concatenated directly with surrounding characters, producing broken links (e.g. "Approval:https://...").

Fix by replacing the simple str.replace call with a regex substitution that inspects the characters immediately before and after the placeholder and inserts a space where none exists.

Fixes #34160

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Screenshots

| Before | After |
img_v3_02106_4658da88-55e5-41e7-b467-fec069431d3g

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

When {{#url#}} is adjacent to non-whitespace text in a Human Input email
delivery body, the rendered URL was concatenated directly with surrounding
characters, producing broken links (e.g. "Approval:https://...").

Fix by replacing the simple str.replace call with a regex substitution
that inspects the characters immediately before and after the placeholder
and inserts a space where none exists.

Fixes langgenius#34160
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.

Human Input email delivery can generate broken form links when {{#url#}} is adjacent to text

1 participant