docs: Update Email link validation note for allowed schemes and anchor links - #837
Conversation
Mautic PR #16508 broadens save-time Email link validation to accept any scheme-prefixed link (such as tel: and mailto:) and anchor links starting with #, and surfaces the validation error beneath the editor. Update the 'Link validation' note in emails.rst to match.
Address @adiati98's suggestion on PR mautic#837: 'checks every link' -> 'validates every link' and 'href is malformed' -> 'href uses an invalid format' in the Link validation note.
|
Thanks, @adiati98 — your suggestion has been applied verbatim to the 'Link validation' note in |
|
Why not list all valid schemes from the PR in your docu? |
Address PR mautic#837 review from @JonasLudwig1998 asking why the note didn't list all valid schemes. Enumerate the complete finite allowlist from mautic/mautic PR #16508 (http, https, ftp, ftps, mailto, tel, sms) instead of the open-ended 'such as' phrasing, and note that http(s)/ftp(s) links must also be structurally valid URLs while mailto/tel/sms need only the scheme.
|
Good catch, @JonasLudwig1998 — done. The 'Link validation' note now lists the complete set of accepted URL schemes ( |
|
Can you keep the changes a bit more compact? Inforamtion like 'beneath the editor,' or 'Fix any flagged link, then save the Email again.' doesn't seem to add extra value in my opinion |
Remove low-value phrasing (error location 'beneath the editor', the 'prevents broken links' rationale, and the closing 'fix and resave' sentence) that reviewer @JonasLudwig1998 flagged as not adding value. All validity facts (seven schemes, anchor links, Mautic tokens, and the structural-URL vs scheme-only distinction) are preserved.
|
Thanks, @JonasLudwig1998 — the 'Link validation' note is now more compact. We dropped the 'beneath the editor' detail, the 'prevents broken links from going out' rationale, and the closing 'Fix any flagged link, then save the Email again.' line, since they didn't add value. The list of accepted schemes ( |
|
The last sentence should be removed from my point of view (Links using |
…te per review Applies @JonasLudwig1998's review feedback on PR mautic#837 to drop the final sentence of the 'Link validation' note in channels/emails.rst.
|
Done, @JonasLudwig1998 — removed the final sentence (the structural-URL vs scheme-only clause) as you suggested. The note is now more compact and still lists the accepted schemes ( |
Reword the valid-link sentence in channels/emails.rst per the reviewer's GitHub suggestion on PR mautic#837: colon-introduced scheme list and comma-separated validity cases. Punctuation only; no factual change.
adiati98
left a comment
There was a problem hiding this comment.
Thanks for the review, @JonasLudwig1998! 🚀
|
@all-contributors please add @JonasLudwig1998 for review. |
|
I've put up a pull request to add @JonasLudwig1998! 🎉 |
Open this suggestion in Promptless to view citations and reasoning process
Updates the 'Link validation' note in channels/emails.rst so it matches the save-time Email link validation from mautic/mautic PR #16508. The note explains that when you save an Email, Mautic validates every link and blocks the save with an error such as 'The email contains an invalid URL: ...' when a link uses an invalid format (for example
://example.com, which has no scheme). A link is valid when itshrefuses one of the seven accepted schemes (http,https,ftp,ftps,mailto,tel, orsms), is an anchor link that starts with#, or is a Mautic token such as{unsubscribe_url}. Targets the 7.2 branch (mautic/mautic 7.x).Review feedback
A link is valid when its href:) followed by an unordered list of the three validity cases (seven schemes, anchor links starting with#, and Mautic tokens). Formatting only; no factual change.Trigger Events
Tip: Tag @Promptless in a GitHub issue to turn it into a documentation update 🐙