Contact: Friendly Captcha v2, opstartvalidatie, ASF-host met Contact-module en hosttests (CMS-U9)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 23:06:23 +01:00
co-authored by Claude Sonnet 5.5
parent f43e00733a
commit 3275092401
20 changed files with 1052 additions and 21 deletions
@@ -107,6 +107,20 @@ public class ContactMailSenderTests
rig.Sent.TextBody.Should().Contain("regel2").And.Contain("Naam:");
}
[Fact]
public async Task ASubjectLabelWithSpecialCharacters_IsEncodedInTheBody_AndNeverReachesTheSubjectOrAHeader()
{
var rig = new Rig();
const string label = "Fotoshoot & <b>\"bruiloft\"</b> 'zomer'";
await rig.Build().SendAsync(Message(subject: label), CancellationToken.None);
rig.Sent!.Subject.Should().Be("Nieuw bericht via De Site");
rig.Sent.HtmlBody.Should().Contain("Fotoshoot &amp; &lt;b&gt;").And.NotContain("<b>\"bruiloft\"");
rig.Sent.TextBody.Should().Contain(" " + label);
rig.Sent.ReplyToAddress.Should().Be(Visitor);
}
[Fact]
public async Task English_UsesEnglishLabelsAndSubject()
{