-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(open_graph): percent-encode url, not html escape #3686
Conversation
Pending hexojs/hexo-util#77 |
bf3969a
to
8b50de3
Compare
0f021a6
to
8bffea1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment removed
@@ -41,7 +41,7 @@ describe('asset_img', () => { | |||
}); | |||
|
|||
it('default', () => { | |||
assetImg('bar title').should.eql('<img src="/foo/bar" class="" title="title">'); | |||
assetImg('bar "a title"').should.eql('<img src="/foo/bar" class="" title="a title">'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hexojs/hexo-util@622167f could have undesired output when
htmlTag('a', { src: '/foo/', title: 'title', alt: 'alt' }, 'text')
title
and alt
are incorrectly seen as boolean. It's a very rare edge case (title="title"
is valid but bad practice), so I don't mind keeping hexojs/hexo-util@622167f, just fyi.
root/path value should be percent-encoded, not html escaped.
What does it do?
Current behavior
Expected behavior
How to test
Pull request tasks