HTML is being rendered as literal string using RazorEngine. How can I prevent this?

前端 未结 2 1091
心在旅途
心在旅途 2020-12-21 00:44

I\'m trying to generate a HTML document with RazorEngine (http://razorengine.codeplex.com/). Everything is mostly working, but the problem I have now is some of the

2条回答
  •  难免孤独
    2020-12-21 00:56

    The alternative to @Raw is to change your API to return HtmlStrings in appropriate places

    Represents an HTML-encoded string that should not be encoded again.

    The default razor behaviour is to encode strings.

提交回复
热议问题