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

Fix #63 for vuepress plugin #93

Merged
merged 1 commit into from Sep 22, 2020
Merged

Fix #63 for vuepress plugin #93

merged 1 commit into from Sep 22, 2020

Conversation

yzhang-gh
Copy link
Contributor

Copied from

const htmlEscapes = {
'&': '&',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;'
}
function escapeHtml(html: string) {
return html.replace(/[&<>"']/g, chr => htmlEscapes[chr])
}

Copy link
Collaborator

@octref octref left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I missed escaping here. Thanks 👍

@octref octref merged commit 8b247a1 into shikijs:master Sep 22, 2020
octref added a commit that referenced this pull request Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants