Skip to content

Commit

Permalink
Merge pull request #28 from jackens/escapeHtml_bug_fix
Browse files Browse the repository at this point in the history
escapeHtml bug fix
  • Loading branch information
octref authored Aug 5, 2020
2 parents 990437e + ce14180 commit 7973326
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shiki/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ export function renderToHtml(lines: IThemedToken[][], options: HtmlRendererOptio
}

function escapeHtml(html: string) {
return html.replace(/</g, '&lt;').replace(/>/g, '&gt;')
return html.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
}

0 comments on commit 7973326

Please sign in to comment.