1

我设计了这样的布局视图页面,

<!DOCTYPE html>
<html lang="tr">
<head>
   1 <META http-equiv=content-type content=text/html;charset=windows-1254>
   2 <META http-equiv=content-type content=text/html;charset=utf-8>
   3 <META http-equiv=content-type content=text/html;charset=iso-8859-9>
    <title>@ViewBag.Title</title>
    <meta name="description" content="@ViewBag.Description"/>

当运行应用程序并查看浏览器源时,一些caharecters 出现如下无效。

<meta name="description" content="s&#252;r&#252;"/>
4

2 回答 2

0

你有 3 个不同的字符集元标记,这完全没有意义。

否则 META "description" 看起来不错 - 包含正确编码的 "sü;rü" 字符串值。

于 2012-08-22T20:17:48.990 回答
0

像这样使用@HTML.Raw(...)

<title>@Html.Raw(ViewData["Title"])</title>
于 2019-08-26T11:49:42.453 回答