【问题标题】:HTML entity not rendering in the live server but it renders correctly in the local machineHTML 实体未在实时服务器中呈现,但它在本地计算机中正确呈现
【发布时间】:2019-08-29 19:33:20
【问题描述】:

在本地机器上显示:

Baby Nursery Accessories and Décor Private Label Amazon FBA Business

但在实时服务器中显示:

Baby Nursery Accessories and Décor Private Label Amazon FBA Business

我已经把它们都放进去了:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta charset="utf-8">

我在 Firefox 和 Chrome 上都检查过,但问题还是一样。顺便说一句,我使用 PHP。也许这会有所帮助。

更新

它只发生在文本框和模式中。

为什么会这样?

【问题讨论】:

    标签: html utf-8 character-encoding special-characters html-entities


    【解决方案1】:

    原来它是由我的代码中的 javascript 使用 $(.selector).text() 而不是 $(.selector).html() 引起的,因此 HTML 实体没有被渲染

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-14
      • 1970-01-01
      相关资源
      最近更新 更多