You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Notification emails escape HTML entities multiple times when sent to a group #2804
escapeStringMap (email.go#L206-L211) mutates its input map in place. eventsNotifier.render (service.go#L159-L176) passes the same fields map to RenderEmailTemplate on every loop iteration, so each iteration HTML-escapes values that were already escaped in the previous one.
Steps to reproduce
Create a project space with & in the name, e.g. Test & Demo.
Invite a group with ≥ 3 members as editor in a single call.
Look at the resulting emails per recipient.
Expected behavior
All recipients get the same subject:
Inviter invited you to join Test & Demo
Actual behavior
Escape depth goes up by one per iteration. Observed on 6.1.0, group invite to 7 members:
Iteration
Subject delivered
1
… Test & Demo
2
… Test & Demo
3
… Test & Demo
4
… Test & Demo
5
… Test & Demo
6
… Test & Demo
7
… Test & Demo
A separate single-recipient invite for the same space (fresh call, fresh map) produced 0× escape, so this is not per-user or locale.
All five handlers that call eventsNotifier.render are affected: ShareCreated, ShareExpired, SharedSpace, UnsharedSpace, MembershipExpired. Any character html.EscapeString touches (&, <, >, ", ') triggers it: apostrophes in display names, & in file or space names.
Setup
OpenCloud 6.1.0, notifications service default config.
🤖 drafted with Claude Code, reviewed before submitting.
Activity
fix(notifications): don't re-escape email vars for each recipient
fix(notifications): don't re-escape email vars for each recipient