D0n9X1n / hexo-blog-encrypt

Yet, just another hexo plugin for security.
https://www.npmjs.com/package/hexo-blog-encrypt
MIT License
971 stars 101 forks source link

Hexo Next加密后公式直接显示出源码,参考#22没法解决 #198

Closed yupngli closed 1 year ago

yupngli commented 1 year ago

Issue

Hexo Next加密后,输入密码解密后,公式直接显示出源码,参考 https://github.com/D0n9X1n/hexo-blog-encrypt/issues/22 没法解决 只有加密的网页无法显示公式,去掉加密后,恢复正常

22 里没有找到这个文件 hexo/node_modules/hexo-blog-encrypt/lib/mcommon.js

Expected Behavior

Xnip2023-01-24_10-11-31

Actual Behavior

Xnip2023-01-24_10-12-36

Steps to Reproduce the Problem

网页地址: https://www.likelihooo.com/2022/05/26/bhm/ 密码:Stat20230101

解密后,公式显示是不正常的。但是再刷新一次,公式就恢复正常了(chrome)

Specifications

(The version of the project, operating system, hardware etc.)

主题:NexT version 8.14.0 hexo-cli: 4.3.0 os: darwin 22.2.0 13.1

node: 18.12.1 v8: 10.2.154.15-node.12 uv: 1.43.0 zlib: 1.2.11 brotli: 1.0.9 ares: 1.18.1 modules: 108 nghttp2: 1.47.0 napi: 8 llhttp: 6.0.10 openssl: 3.0.7+quic cldr: 41.0 icu: 71.1 tz: 2022b unicode: 14.0 ngtcp2: 0.8.1 nghttp3: 0.7.0

hexo-blog-encrypt: "version": "3.1.6"

D0n9X1n commented 1 year ago

mcommon.js 重命名为 hbe.js 了,所以你只需要在 hbe.js 的对应位置加上 #22 的解决方法就行了。

D0n9X1n commented 1 year ago

或者参考 https://github.com/D0n9X1n/hexo-blog-encrypt#about-callback ,把你用的公式的渲染函数写进去。

yupngli commented 1 year ago

谢谢,我可否请教下如何在 hbe.js 的对应位置加上 #22 的解决方法?没有相关基础,研究了好久没明白