You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% 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 scripts directory.
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.
-{% 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.
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
The text was updated successfully, but these errors were encountered: