Skip to content

refactor: move activity description escaping to templates#762

Open
anonymoususer72041 wants to merge 1 commit intoopencats:masterfrom
anonymoususer72041:refactor/escape-activity-descriptions-at-output
Open

refactor: move activity description escaping to templates#762
anonymoususer72041 wants to merge 1 commit intoopencats:masterfrom
anonymoususer72041:refactor/escape-activity-descriptions-at-output

Conversation

@anonymoususer72041
Copy link
Copy Markdown
Contributor

@anonymoususer72041 anonymoususer72041 commented May 1, 2026

This PR moves activity description escaping for activity schedule event modals from the controller layer to the template output layer.

Previously, the contact and candidate activity modal descriptions were escaped before being assigned to the template, while the corresponding templates rendered the assigned value directly. This worked, but mixed presentation escaping into the controller flow and made it easier to accidentally introduce inconsistent escaping behavior.

The controllers now assign the raw activity note to activityDescription, and the modal templates escape the value at the output boundary using the existing OpenCATS template escaping helper. This keeps the value escaped exactly once, avoids double escaping and aligns the contact and candidate activity schedule event modals with the preferred template output pattern.

The change is intentionally limited to the contact and candidate activity schedule event modal description flow. It does not change activity creation, request handling, database handling, calendar event behavior or modal behavior.

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.

1 participant