Closed bianyukun1213 closed 8 months ago
Is https://github.com/hexojs/hexo/pull/5395 causing this?
yes
Is #5395 causing this?
-{% 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"
-%}
+{% 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" %}
place them in one line will work in v7.1.0
I have check nunjucks and jinja both support that place {{
}}
in different lines. But #5395 broken it.
@bianyukun1213
Just now we published v7.1.1
.
Thank you for your reporting :)
Check List
hexo version
to check)Expected behavior
I use this image masonry tag to insert images in my post.
For example,
should render an image masonry that contains 2 images with
args[0]
parsed ashttps://my.oss.bucket/an-image.webp |alt text 1|image title 1
andargs[1]
parsed ashttps://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"
, causingargs[0]
to change into"https://my.oss.bucket/an-image.webp
andargs[1]
to change into|alt
. Also, there will beargs[2]
,args[3]
, etc…Eventually, the image masonry will not be rendered correctly.
How to reproduce?
scripts
directory.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
Your Hexo and Plugin version
Your
package.json
Your site's
_config.yml
(Optional)No response
Others
No response