Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] add escapeMultilineString Handlebar helper (elastic#195159)
## Summary Adding a handlebar helper to escape multiline strings. It has the same function as `escapeStringHelper`, but does not wrap strings in single quotes, allowing concatenation of escaped variables in the `hbs` template such as this example: ```hbs audit_rules: "{{escape_multiline_string audit_rules}} {{escape_multiline_string " # Session data audit rules -a always,exit -F arch=b64 -S execve,execveat -k exec -a always,exit -F arch=b64 -S exit_group -a always,exit -F arch=b64 -S setsid"}}" {{else}} {{#if audit_rules}} audit_rules: {{escape_string audit_rules}} {{/if}} {{/if}} ``` The above would not be possible using only `escape_string` as `audit_rules` would be wrapped in single quotes. ## Screenshots The example above illustrates how this option allows the Auditd manager integration to append Session data audit rules to the `audit_rules` field when Session data is enabled in the integration ([PR](elastic/integrations#11336)). <img width="872" alt="image" src="https://github.com/user-attachments/assets/325d784d-26a4-4dfe-9d0e-54d51c3ed060"> <img width="801" alt="image" src="https://github.com/user-attachments/assets/ebd521c0-4471-48f9-ba8d-94630ea0efd2">
- Loading branch information