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
Unknown Object (File)
Tue, Dec 17, 06:13
Unknown Object (File)
Mon, Dec 16, 21:46
Unknown Object (File)
Mon, Dec 16, 21:24
Unknown Object (File)
Thu, Dec 12, 21:39
Unknown Object (File)
Thu, Dec 12, 03:30
Unknown Object (File)
Tue, Dec 10, 16:39
Unknown Object (File)
Mon, Dec 2, 19:05
Unknown Object (File)
Mon, Dec 2, 19:05
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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

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