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

Escape HTML in release note commit messages #500

Merged
merged 1 commit into from
Feb 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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