We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
By default, this implementation of Razor will not encode values to be HTML safe, you need to escape values by yourself
RazorEngine razorEngine = new RazorEngine(); RazorEngineCompiledTemplate template = razorEngine.Compile("Hello @Model.Name"); string result = template.Run(new { Name = "<b>Test</b>" }); Console.WriteLine(result);
will output
Hello <b>Test</b>