hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.63k stars 4.87k forks source link

hexo渲染的博客文章会将类似于 的符号,并不会处理显示为空格,而是以字符的形式显示出来/Blog posts rendered by hexo will display symbols similar to   instead of being displayed as spaces, but as characters #4946

Closed lym0518 closed 2 years ago

lym0518 commented 2 years ago

Check List

Please check followings before submitting a new issue.

Expected behavior

markdown文章中输入类似 的符号在部署后会显示为空格。

Symbols like  entered in markdown articles will be displayed as spaces after deployment.

Actual behavior

markdown文章中输入类似 的符号在部署后会显示为 

Symbols like  entered in markdown articles will be displayed as  after deployment

How to reproduce?

Is the problem still there under "Safe mode"?

Environment & Settings

Node.js & npm version(node -v && npm -v)

node: v16.14.2 npm: 8.5.0

Your site _config.yml (Optional)

Hexo and Plugin version(npm ls --depth 0)

+-- aplayer@1.10.1
+-- hexo-autonofollow@1.0.1
+-- hexo-deployer-git@3.0.0
+-- hexo-generator-archive@1.0.0
+-- hexo-generator-category@1.0.0
+-- hexo-generator-index-pin-top@0.2.2
+-- hexo-generator-index@2.0.0
+-- hexo-generator-json-content@4.2.3
+-- hexo-generator-search@2.4.3
+-- hexo-generator-seo-friendly-sitemap@0.2.1
+-- hexo-generator-sitemap@2.1.0
+-- hexo-generator-tag@1.0.0
+-- hexo-renderer-ejs@1.0.0
+-- hexo-renderer-marked@5.0.0
+-- hexo-renderer-stylus@2.0.1
+-- hexo-server@2.0.0
+-- hexo-tag-aplayer@2.0.7
+-- hexo-theme-landscape@0.0.3
+-- hexo-theme-volantis@5.0.0-rc.3
+-- hexo-wordcount@6.0.1
+-- hexo@5.4.1
`-- valine@1.4.16

Your package.json package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "5.4.1"
  },
  "dependencies": {
    "aplayer": "^1.10.1",
    "hexo": "^5.0.0",
    "hexo-autonofollow": "^1.0.1",
    "hexo-deployer-git": "^3.0.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^2.0.0",
    "hexo-generator-index-pin-top": "^0.2.2",
    "hexo-generator-json-content": "^4.2.3",
    "hexo-generator-search": "^2.4.3",
    "hexo-generator-seo-friendly-sitemap": "^0.2.1",
    "hexo-generator-sitemap": "^2.1.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^5.0.0",
    "hexo-renderer-stylus": "^2.0.1",
    "hexo-server": "^2.0.0",
    "hexo-tag-aplayer": "^2.0.2",
    "hexo-theme-landscape": "^0.0.3",
    "hexo-theme-volantis": "^5.0.0-rc.3",
    "hexo-wordcount": "^6.0.1",
    "valine": "^1.4.14"
  }
}

Others

jiangtj commented 2 years ago

The & replace with & is in a common utility 🤔

https://github.com/hexojs/hexo-util/blob/master/lib/escape_html.js

MHuiG commented 2 years ago
git clone git@github.com:volantis-x/community.git && cd community

git reset --hard b96c4289a1833260acfe8252f5cd21bd4fa862d3

git submodule update --init

npm i && hexo s

see: http://localhost:4000/how-to-update/

image

MHuiG commented 2 years ago
git clone git@github.com:volantis-x/community.git && cd community

git reset --hard 54d3585f0fc4dbe44c7935f84429e5268612a8b6

git submodule update --init

npm i && hexo s

see: http://localhost:4000/how-to-update/

image

MHuiG commented 2 years ago

What is the difference between b96c4289a1833260acfe8252f5cd21bd4fa862d3 and 54d3585f0fc4dbe44c7935f84429e5268612a8b6 ?

MHuiG commented 2 years ago

May be hexo-renderer-ejs or hexo-renderer-marked or hexo

MHuiG commented 2 years ago

确认了 hexo-renderer-marked@4 是正常的 hexo-renderer-marked@5 渲染异常

lym0518 commented 2 years ago

可能是 hexo-renderer-ejs 或 hexo-renderer-marked 或 hexo

It is indeed possible, thank you for your reply, I will think about it again This problem appeared rather suddenly, only in the last few releases

lym0518 commented 2 years ago

确认了 hexo-renderer-marked@4 是正常的 hexo-renderer-marked@5 渲染异常

原来如此,这是好早之前的问题了,那一天更新后开始出现。

stevenjoezhang commented 1 year ago

Caused by https://github.com/hexojs/hexo-renderer-marked/pull/214/commits/9e1c7ade8e62293ab7d8b60e5c9c2d11c8c55389

Fixed in https://github.com/hexojs/hexo-util/pull/328