Skip to content

Commit

Permalink
Escape HTML in release note commit messages (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
loilo committed Feb 16, 2020
1 parent a44f05d commit 05bb791
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -36,6 +36,7 @@
"chalk": "^3.0.0",
"cosmiconfig": "^6.0.0",
"del": "^4.1.0",
"escape-goat": "^3.0.0",
"escape-string-regexp": "^2.0.0",
"execa": "^4.0.0",
"github-url-from-git": "^1.5.0",
Expand Down
3 changes: 2 additions & 1 deletion source/ui.js
Expand Up @@ -2,6 +2,7 @@
const inquirer = require('inquirer');
const chalk = require('chalk');
const githubUrlFromGit = require('github-url-from-git');
const {htmlEscape} = require('escape-goat');
const isScoped = require('is-scoped');
const util = require('./util');
const git = require('./git-util');
Expand Down Expand Up @@ -36,7 +37,7 @@ const printCommitLog = async (repoUrl, registryUrl) => {
}).join('\n');

const releaseNotes = nextTag => commits.map(commit =>
`- ${commit.message} ${commit.id}`
`- ${htmlEscape(commit.message)} ${commit.id}`
).join('\n') + `\n\n${repoUrl}/compare/${latest}...${nextTag}`;

const commitRange = util.linkifyCommitRange(repoUrl, `${latest}...master`);
Expand Down

0 comments on commit 05bb791

Please sign in to comment.