drudru/ansi_up

Escape for html stopped woking since 5.0.0

Closed this issue · 1 comments

Hi! We've been using this js package for while now in order to translate our CI logs and save them as easy to read html logs.
Now, we've always preformatted the text to html ourselves because there are a few caveats we needed to take care of. So we changed the escape_for_html property to true.

However, since v5.0.0, that property is ignored, so if for example you would run:

var ansi = new AnsiUp;
ansi.escape_for_html = false;
ansi.ansi_to_html('hello<br>')

The result would be:

"hello&lt;br&gt;"

For now, we are going to regress and use v4.0.4.

Thanks in advance!

Hi @quaark

We had to do this for: https://nvd.nist.gov/vuln/detail/CVE-2021-3377

My recommendation for you is to lock it to v4.0.4 on your end (as you have already done)