• HTML特殊转义字符列表


    HTML特殊转义字符列表
    最常用的字符实体
    Character Entities
    显示 说明 实体名称 实体编号
    半方大的空白    
    全方大的空白    
    不断行的空白格    
    < 小于 &lt; &#60;
    > 大于 &gt; &#62;
    & &符号 &amp; &#38;
    " 双引号 &quot; &#34;
    ? 版权 &copy; &#169;
    ? 已注册商标 &reg; &#174;
    ? 商标(美国) ? &#8482;
    × 乘号 &times; &#215;
    ÷ 除号 &divide; &#247;



    /// <summary>
    /// Replaces the &lt; with the less then symbol and &gt; with the greater then symbol.
    /// </summary>
    /// <param name="xml">String to be unescaped</param>
    /// <returns>An xml string containing the greter then and less then symbols.</returns>
    private string UnEscapeXml(string xml)
    {
    string result = xml.Replace("&lt;", "<");
    result = result.Replace("&gt;", ">");
    result = result.Replace("'<'", "&lt;");
    result = result.Replace("'quot'", "&quot;");
    return result.Replace("'>'", "&gt;");
    }

    /// <summary>
    /// Replaces the less then and greater then symbol with &lt; and &gt;
    /// </summary>
    /// <param name="xml">String to be escaped</param>
    /// <returns>An xml string with &lt; and &gt;</returns>
    private string EscapeXml(string xml)
    {
    string result = xml.Replace("&lt;", "'&lt;'");
    result = result.Replace("&quot;", "'quot'");
    result = result.Replace("&gt;", "'&gt;'");
    result = result.Replace("<", "&lt;");
    return result.Replace(">", "&gt;");
    }

  • 相关阅读:
    docker2核 elasticsearch卡死
    spring cloud config
    App网关Zuul
    spring Ribon
    spring Feign声明式服务消费(Ribbon Hystrix )
    spring Hystrix
    spring cloud 整体介绍
    springbean 生命周期
    xml六种解析方式
    jdk8中的forEach使用return执行下一次遍历
  • 原文地址:https://www.cnblogs.com/zhangchenliang/p/2391961.html
Copyright © 2020-2023  润新知