toddams / RazorLight

Template engine based on Microsoft's Razor parsing engine for .NET Core
Apache License 2.0
1.52k stars 259 forks source link

Template content with "\r\n" #416

Closed cksanjose closed 3 years ago

cksanjose commented 3 years ago

I'm using RazorLight to generate an automated email. The email is in text format. The content contains a list of items and each item ends with "\r\n" so they are rendered in new line.

To Reproduce The content is:

"* OriginalFileName16755af9-c1ea-42f3-a0b8-e37f869a21f7\r\n"

It is rendered as:

"* OriginalFileName16755af9-c1ea-42f3-a0b8-e37f869a21f7
"

Expected behavior A clear and concise description of what you expected to happen. If you're getting an assembly not found error, you need to include a sample csproj, as there is no way to know why this occurs without seeing how you set-up your project.

Information (please complete the following information):

Additional context Add any other context about the problem here.

jzabroski commented 3 years ago

@cksanjose Can you try the DisableEncoding mentioned in the README