Skip to content
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

refactor: relpace node-html-entities with escapeHTML() #129

Merged
merged 1 commit into from Nov 10, 2019

Conversation

@SukkaW
Copy link
Member

SukkaW commented Nov 10, 2019

Fix #127. Use hexo-util's built-in escapeHTML() to replace node-html-entities, while retains node-html-entities in unit-test to make sure the behaviors of highlight remain unchanged after this PR.

@SukkaW SukkaW requested a review from curbengh Nov 10, 2019
@coveralls

This comment has been minimized.

Copy link

coveralls commented Nov 10, 2019

Coverage Status

Coverage decreased (-0.007%) to 95.447% when pulling 7f9b8b0 on SukkaW:drop-node-html-entities into 71bbcc4 on hexojs:master.

@SukkaW SukkaW force-pushed the SukkaW:drop-node-html-entities branch from 992e4d8 to 7f9b8b0 Nov 10, 2019
@SukkaW

This comment has been minimized.

Copy link
Member Author

SukkaW commented Nov 10, 2019

Rebased to remove accidentally included package-lock.json.

Copy link
Contributor

curbengh left a comment

(not suggesting to add anything)

One possible gotcha is that escapeHTML() escapes more characters than node-html-entities. This is fine as long as we don't test those characters (i.e. forward slash and backquote).

@SukkaW SukkaW merged commit a1ad13b into hexojs:master Nov 10, 2019
2 of 3 checks passed
2 of 3 checks passed
coverage/coveralls Coverage decreased (-0.007%) to 95.447%
Details
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.