且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

剃须刀 - @ Html.Raw()仍编码和放大器;放大器;在meta标签属性

更新时间:2023-02-14 21:27:49

作为patridge指出出他的答案你可以只包括在参数属性标记来 .RAW

As patridge pointed out in his answer you can just include the attribute markup in the parameter to .Raw.

在您的情况下,这将导致类似下面的内容:

In your case that would result in something similar to the following:

<meta name="description" @Html.Raw("content=\"My Site&amp;reg;\"") />