-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Check List
- I have already read Docs page & Troubleshooting page.
- I have already searched existing issues and they are not help to me.
- I examined error or warning messages and it's difficult to solve.
- I am using the latest version of Hexo. (run
hexo versionto check) - My Node.js is matched the required version.
Expected behavior
I use this image masonry tag to insert images in my post.
For example,
{% image_masonry
"https://my.oss.bucket/an-image.webp |alt text 1|image title 1"
"https://my.oss.bucket/another-image.webp |alt text 2|image title 2"
%}
should render an image masonry that contains 2 images with args[0] parsed as https://my.oss.bucket/an-image.webp |alt text 1|image title 1 and args[1] parsed as https://my.oss.bucket/another-image.webp |alt text 2|image title 2. It works in Hexo v7.0.0.
Actual behavior
However, in Hexo v7.1.0, the " character in the example above will be escaped to ", causing args[0] to change into "https://my.oss.bucket/an-image.webp and args[1] to change into |alt. Also, there will be args[2], args[3], etc…
Eventually, the image masonry will not be rendered correctly.
How to reproduce?
- Download the image masonry tag I mentioned and move it to the
scriptsdirectory. - Insert an image masonry into a post, like the example above.
- Generate the site.
Is the problem still there under Safe mode?
I don’t know, since “Safe mode” will disable all the scripts. But I think the problem will still be there.
Your Node.js & npm version
v18.19.0
10.3.0
Your Hexo and Plugin version
hexo-site@0.0.0 /user_shares/user_hollis/repos/blog-source/src
├── @minify-html/node@0.15.0
├── cheerio@1.0.0-rc.12
├── crypto-js@4.2.0
├── hexo-abbrlink@2.2.1
├── hexo-deployer-git@4.0.0
├── hexo-draft-tags@0.1.1
├── hexo-filter-nofollow@2.0.2
├── hexo-generator-alias@1.0.0
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-searchdb@1.4.1
├── hexo-generator-sitemap@3.0.1
├── hexo-generator-tag@2.0.0
├── hexo-hide-posts@0.4.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-markdown-it@7.1.1
├── hexo-renderer-stylus@3.0.1
├── hexo-server@3.0.0
├── hexo-tag-collapse-spoiler@1.0.0
├── hexo-theme-redefine@2.6.0
├── hexo-wordcount@6.0.1
├── hexo-yam@8.0.0
├── hexo@7.1.0
├── html-minifier-terser@7.2.0
└── moment@2.30.1
Your 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": "7.1.0"
},
"dependencies": {
"@minify-html/node": "^0.15.0",
"cheerio": "^1.0.0-rc.12",
"crypto-js": "^4.2.0",
"hexo": "^7.1.0",
"hexo-abbrlink": "^2.2.1",
"hexo-deployer-git": "^4.0.0",
"hexo-draft-tags": "^0.1.1",
"hexo-filter-nofollow": "^2.0.2",
"hexo-generator-alias": "^1.0.0",
"hexo-generator-archive": "^2.0.0",
"hexo-generator-category": "^2.0.0",
"hexo-generator-index": "^3.0.0",
"hexo-generator-searchdb": "^1.4.1",
"hexo-generator-sitemap": "^3.0.1",
"hexo-generator-tag": "^2.0.0",
"hexo-hide-posts": "^0.4.0",
"hexo-renderer-ejs": "^2.0.0",
"hexo-renderer-markdown-it": "^7.1.1",
"hexo-renderer-stylus": "^3.0.1",
"hexo-server": "^3.0.0",
"hexo-tag-collapse-spoiler": "^1.0.0",
"hexo-theme-redefine": "^2.6.0",
"hexo-wordcount": "^6.0.1",
"hexo-yam": "^8.0.0",
"html-minifier-terser": "^7.2.0",
"moment": "^2.30.1"
}
}Your site's _config.yml (Optional)
No response
Others
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working