forgejo/models/activities
Mathieu Fenniak 1f2bbbd4aa fix: prevent user-entered text with | characters from being truncated in activity feed (#8844)
Prevents a variety of user-entered texts that can contain `|` characters from being truncated in the activity feed, affecting: issue & PR titles, comment content, review comments, and review dismissal comments.

Where `action.content` was containing a pipe-separated list of UI data fields before, it now uses a JSON-encoded string array.  The old format is still supported for reading from the feed.  In some places where `action.content` was not using this format, or where user-generated text was not inserted, the old format is retained.

Fixes part of the cause behind #8781, allowing small mermaid graphs to be rendered in the feed (for now...) --
![image](/attachments/4de98825-4fb7-4b5d-87c3-bd54d6f0a1d1)

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8844
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-08-10 19:48:46 +02:00
..
action.go fix: prevent user-entered text with | characters from being truncated in activity feed (#8844) 2025-08-10 19:48:46 +02:00
action_list.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
action_test.go fix: prevent user-entered text with | characters from being truncated in activity feed (#8844) 2025-08-10 19:48:46 +02:00
federated_user_activity.go Federated user activity following: Isolated model changes (#8078) 2025-06-21 12:02:58 +02:00
federated_user_activity_test.go Federated user activity following: Isolated model changes (#8078) 2025-06-21 12:02:58 +02:00
main_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
notification.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
notification_list.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
notification_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
repo_activity.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
repo_activity_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
statistic.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
user_heatmap.go fix: include activity needed for entire heatmap (#7893) 2025-05-21 05:25:39 +02:00
user_heatmap_test.go fix: include activity needed for entire heatmap (#7893) 2025-05-21 05:25:39 +02:00