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

Commit messages with HTML elements break layout #129

Closed
y0hami opened this issue Aug 28, 2019 · 1 comment
Closed

Commit messages with HTML elements break layout #129

y0hami opened this issue Aug 28, 2019 · 1 comment

Comments

@y0hami
Copy link

y0hami commented Aug 28, 2019

If commit subjects have HTML elements it breaks the layout when rendered on the likes of GitHub.

An easy fix for this is to replace all < and > with &lt; and &gt;, this will render as expected and won't break the layout of the document.

Before replacing characters:

image

After replacing:

image

I think the easiest way to achieve the suggested fix would be to add a new function here to clean the subject https://github.com/CookPete/auto-changelog/blob/75e5cfe876fa427d908c86d1c6fdbddbc50a9e3d/src/commits.js#L61

This could also be applied to the commit body here in case
it also contains any element references and is used in the changelog https://github.com/CookPete/auto-changelog/blob/75e5cfe876fa427d908c86d1c6fdbddbc50a9e3d/src/commits.js#L62

If you want I am happy to open a PR to apply the fix 🙂

@cookpete
Copy link
Owner

cookpete commented Sep 4, 2019

Fixed in auto-changelog@1.16.1 👍

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

No branches or pull requests

2 participants