apache / security-vulnogram

Vulnogram is a tool for creating and editing CVE information in CVE JSON format
https://vulnogram.github.io/
MIT License
5 stars 4 forks source link

Avoid repeating a URL in the HTML to text conversion #82

Closed raboof closed 1 year ago

raboof commented 1 year ago

When you type a URL into the WYSIWYG editor, it gets converted to a link automatically. However, when it is then converted to plain text, htmltoText produces the URL twice: once as the 'link text' and once as the link itself.

This change makes sure that if the link text is identical to the link itself, it is not repeated.