一个HtmlEncode函数,如下:        public static string HtmlEncode(string theString)
        {
            //theString = theString.Replace(">", ">");
            //theString = theString.Replace(" <", "&lt;");
            theString = System.Text.RegularExpressions.Regex.Replace(theString, @"<(?!(a\s+)|(/a>))([^<>]*?)>", "&lt$3&gt;");
          //  theString = theString.Replace(" ", " &nbsp;");
            theString = System.Text.RegularExpressions.Regex.Replace(theString, @" (?![^>]*>)", "&nbsp;");
            theString = System.Text.RegularExpressions.Regex.Replace(theString, @"""(?![^>]*>)", "&quot;");
            theString = System.Text.RegularExpressions.Regex.Replace(theString, @"'(?![^>]*>)", "&#39;");
            //theString = theString.Replace("\"", "&quot;");
            //theString = theString.Replace("\'", "&#39;");
            theString = theString.Replace("\n", " <br/> ");
            return theString;
        }问题:
当我用Fckeditor插入文字时,切换到html显示
<p>&nbsp;</p>
<p>csdn</p>
<p>&lt;a href=&quot;www.baidu.com&quot;&gt;baidu&lt;/a&gt;</p>
<p>&nbsp;</p>插入后,页面直接显示成
&ltp> </p>
&ltp>csdn</p>
&ltp><a href="www.baidu.com">baidu</a></p>
&ltp> </p>如何修改该方法使之能正常显示!!!