fix(lexicon): Keep signup email manager URL out of trailing punctuation - #17017
Open
Ibochkarev wants to merge 2 commits into
Open
Ibochkarev wants to merge 2 commits into
Ibochkarev wants to merge 2 commits into
Conversation
Some mail clients autolink [[+surl]] with the following comma or parenthesis and break the manager link. Wrap the English default in an HTML anchor and rewrite stock signupemail_message values on upgrade. Fixes modxcms#15209
Ibochkarev
marked this pull request as ready for review
September 6, 2026 05:49
JoshuaLuckers
approved these changes
Sep 6, 2026
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.
What changed and why
Some mail clients (Windows Mail was the original report) autolink
[[+surl]]in the default signup email and pull in the following,or). The opened URL 404s.English
setting_signupemail_message_defaultnow uses an HTML anchor:<a href="[[+surl]]">[[+surl]]</a>. Punctuation stays outside thehref. Mail already goes out as HTML viaemail/default.tpl.The 3.3.0 upgrade wraps bare
[[+surl]]in the storedsignupemail_messagesetting the same way. Values that already usehref="[[+surl]]"(or customized text withoutsurl) are left alone. Other lexicon locales are unchanged in this PR.How to test
signupemail_messageto the English default (or clear it and confirm create-user notify falls back / uses the updated default after reset).,or).…at [[+surl]],…or…([[+surl]])…), run the 3.3.0 upgrade script, confirm it becomes an<a href="[[+surl]]">and customized messages without that placeholder are untouched.Related issue(s)/PR(s)
Resolves #15209
Compatibility notes
Universal for sites that still use the stock
signupemail_messagetext (common after 2.x upgrades). Fresh 3.x installs without that setting already fall back tologin_signup_email, which already uses a proper link.Breaking change assessment
No public API change. Default English copy and upgrade rewrite of matching DB values only. Custom signup email text without
[[+surl]]is not modified. Safe for patch-level consumers.Test coverage
No automated tests. Coverage is email-client behavior and a one-shot setup upgrade against stored system setting values.
Contributors
Thanks @stuke2 for the report.
AI tool use
Cursor (Composer) helped draft the lexicon/upgrade change and this PR description. I reviewed the diff and the upgrade guards before opening the PR.