1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

Tools: Improved HTML escape in git-changelog

This commit is contained in:
Laurent Cozic 2020-10-31 13:05:46 +00:00
parent d19796f14c
commit 08c2a7ad64

View File

@ -10,12 +10,13 @@ const { execCommand, githubUsername } = require('./tool-utils.js');
// From https://stackoverflow.com/a/6234804/561309
function escapeHtml(unsafe) {
// We only escape <> as this is enough for Markdown
return unsafe
.replace(/&/g, '&amp;')
// .replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#039;');
.replace(/>/g, '&gt;');
// .replace(/"/g, '&quot;')
// .replace(/'/g, '&#039;');
}
async function gitLog(sinceTag) {