Fix broadcast message rendering
What does this MR do?
With the broadcast placeholders we're using
Banzai#render_and_post_process
instead of Banzai#render_field
like
before. render_and_post_process
is using render
instead of
render_field
internally, which means that we need to pass in the text
of a broadcast message instead of which field should be rendered.
However another difference of this method is that it is not
automatically using the BroadcastMessagePipeline
for rendering. We
could overcome this by passing pipeline: :broadcast_message
in the
context but I've instead added another method
render_field_and_post_process
which calls render_field
internally
instead to align with the behaviour that we used before.
Issue: #212035 (closed)
No changelog since it's still behind the feature flag broadcast_message_placeholders
Screenshots
Before the fix we didn't use the BroadcastMessagePipeline
with the broadcast_message_sanitization_filter
.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team