Page MenuHomeDevCentral

Don't escape new line in Etherpad welcome message
ClosedPublic

Authored by dereckson on May 18 2023, 11:31.
Tags
None
Referenced Files
F12282974: D3106.id.diff
Sat, Oct 18, 03:21
F12281120: D3106.diff
Fri, Oct 17, 21:00
F12278913: D3106.id7927.diff
Fri, Oct 17, 14:55
F12278900: D3106.id7926.diff
Fri, Oct 17, 14:55
Unknown Object (File)
Mon, Oct 13, 13:26
Unknown Object (File)
Sun, Oct 5, 20:32
Unknown Object (File)
Sat, Oct 4, 18:22
Unknown Object (File)
Sat, Oct 4, 00:01
Subscribers
None

Details

Summary

Both the json (Salt) and tojson (Jinja2) filters escape new lines
as \\n in JSON strings.

In this specific case, we need a direct \n, as we output configuration
and not a string template to be rendered aftewards.

This new line escape dance is a little bit hacky, but it's not straightforward
to determine what kind of JSON it needs to produce, to create a new filter.

This is a follow-up for dda0e01728ce.

Ref T1871.

Test Plan

Restarted Etherpad, created new pad, new lines are OK

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
newlines-fix
Build Status
Buildable 4902
Build 5183: arc lint + arc unit

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.May 18 2023, 11:32