-
-
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(post): swig tag inside post #4352
Conversation
The fixes for #3543 is not included. Maybe I will open an another PR. |
@@ -669,13 +669,13 @@ describe('Post', () => { | |||
}); | |||
|
|||
it('render() - recover escaped nunjucks blocks which is html escaped', () => { | |||
const content = '`{% raw %}{{ test }}{% endraw %}`'; | |||
const content = '`{% raw %}{{ test }}{% endraw %}`, {%raw%}{{ test }}{%endraw%}'; |
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.
The alter of the test case here is to test my newly added rSwigRawFullBlock
engine: 'markdown' | ||
}); | ||
|
||
data.content.trim().should.eql('<p>In Go’s templates, blocks look like this: <code>&#123;&#123;block "template name" .&#125;&#125; (content) &#123;&#123;end&#125;&#125;</code>.</p>'); |
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.
It seems that &#123;
is escaped twice and it's displayed as {
instead of {
in the browser. Is this expected?
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.
I will update the test case using escapeHTML
to make it clearer.
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.
The marked.js
will escape code by default, thus caused double escape.
- to include hexojs/hexo#4352 fix
What does it do?
The PR fixes #3259, #3346 & #3346 (comment)
How to test
Screenshots
Pull request tasks