Fluid View engine does not work with Windows-style paths corretly
JustusGreiberORGADATA opened this issue · 2 comments
The following code does not work on a Windows machine properly, because the path is generated with the Windows-style path seperator (MemberInvitation\MemberInvitation.liquid
) but the discovery code for partials, layouts and viewstarts can't deal with the backslash.
var path = Path.Join("MemberInvitation", "MemberInvitation.liquid");
await fluidViewRenderer.RenderViewAsync(stringWriter, path, templateContext);
For example the code here expects the path seperator to be the forward slash:
fluid/Fluid.ViewEngine/FluidViewRenderer.cs
Lines 96 to 121 in f61b88f
I'm wondering how it works before?
Before there was no layout path resolution algorithm like that. It just took the layout path directly from the root of the file provider. It was changed here:
26b9311#diff-87667ed94ee7cf341f18d062a1184f52f622dd055e657180b4eeab7a4e02c412R53-R61