Fix broken XHTML in Atom feed for notes with line breaks
What does this MR do and why?
Notes in the project activity Atom feed were rendered using markdown_field, which uses the default Banzai pipeline and produces standard HTML with bare <br> tags. The <summary type="xhtml"> element in the Atom feed requires valid XHTML, where <br> must be self-closing (<br />).
This fix adds the missing Events::RenderService call with atom_request: true in ProjectsController#show for the atom format, consistent with GroupsController, UsersController, and Dashboard::ProjectsController. This pre-renders and caches the events using the correct XHTML-aware pipeline, so that markdown_field in the view produces self-closing <br /> tags.
Note: the _event_note.atom.haml view continues to use markdown_field(note, :note) (rather than markdown(note.note, pipeline: :atom, ...)), which allows it to use the pre-rendered cache from Events::RenderService and avoids per-note re-rendering with all its associated lookups.
References
Fixes #361722
Screenshots or screen recordings
| Before | After |
|---|---|
|
|
|
How to set up and validate locally
- Post a comment with a line break on any issue
- Visit the project activity Atom feed at
http://localhost:3000/group/project.atom?private_token=TOKEN - Before fix: feed contains bare
<br>tags, producing invalid XML - After fix: feed contains self-closing
<br />, producing valid XHTML
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

