【问题标题】:Escaping German umlauts in Pug在 Pug 中逃脱德国变音符号
【发布时间】:2017-06-30 18:09:28
【问题描述】:

我设置了一个运行 Pug 作为视图引擎的小型 Node.js 服务器。
当我写下一些文本时,除了变音符号 (ÄÖÜäööü) 和 ß 之外,Pug 会自动对其进行转义。 有没有办法以使 ä 显示为实际 ä​​ 的方式转义字符?使用实体或 html-entities 时,我会得到一个带有感叹号的黑框或实际的转义序列。

【问题讨论】:

  • 你能举个例子吗?

标签: html node.js pug html-entities


【解决方案1】:

添加

meta(charset="UTF-8")

到您页面的头部。

doctype html
html(lang='en')
  head
    meta(charset='UTF-8')
    title Title
  body

【讨论】:

  • 我做了,但没有。
猜你喜欢
  • 1970-01-01
  • 2016-08-06
  • 2016-01-21
  • 2021-09-28
  • 1970-01-01
  • 2023-04-08
  • 1970-01-01
  • 1970-01-01
  • 2013-02-09
相关资源
最近更新 更多