By the default RazorLight encodes Model values as HTML, but sometimes you want to output them as is.
string content = "Hello @Model.Name"; var model = new { Name = "\"John Doe\"" }; string result = engine.ParseString(content, model); //Output - Hello "Jogn Doe"
Use @Raw() method to output value without encoding it
@Raw()
string content = "Hello @Raw(Model.Name)"; //Output - Hello "John Doe"
There was an error while loading. Please reload this page.