
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@ciolabs/html-email-formatter
Advanced tools
Format and prettify HTML email content with conditional comment support
Email HTML often contains Microsoft Outlook conditional comments (<!--[if mso]>) that need special handling during formatting. Standard HTML formatters can break these comments or misalign their indentation. This package safely formats email HTML while preserving conditional comment structure and whitespace.
When building HTML emails, you often need to include conditional comments for Microsoft Outlook compatibility:
<div>
<!--[if mso]>
<table><tr><td>
<![endif]-->
<p>Email content</p>
<!--[if mso]>
</td></tr></table>
<![endif]-->
</div>
Standard HTML formatters either:
This formatter handles these edge cases correctly.
npm install @ciolabs/html-email-formatter
import emailFormatter from '@ciolabs/html-email-formatter';
const html = `
<div>
<!--[if mso]>
<table><tr><td>
<![endif]-->
<p>Email content</p>
<!--[if mso]>
</td></tr></table>
<![endif]-->
</div>
`;
const formatted = emailFormatter(html);
console.log(formatted);
Output:
<div>
<!--[if mso]>
<table>
<tr>
<td>
<![endif]-->
<p>Email content</p>
<!--[if mso]>
</td>
</tr>
</table>
<![endif]-->
</div>
The formatter accepts options from both pretty and js-beautify:
const formatted = emailFormatter(html, {
indent_size: 4,
wrap_line_length: 80,
preserve_newlines: false,
});
<!--[if mso]>content<![endif]--> to <!--[if mso]>-->content<!--<![endif]--> so formatters can process the inner HTMLemailFormatter(html, options?)Formats HTML email content while preserving conditional comments.
Parameters:
html (string) - The HTML content to formatoptions (object, optional) - Formatting options combining pretty options and js-beautify HTML optionsReturns:
Common Options:
indent_size (number) - Number of spaces for indentation (default: 2)wrap_line_length (number) - Line length before wrapping (default: 80)preserve_newlines (boolean) - Whether to preserve existing newlines (default: true)max_preserve_newlines (number) - Maximum consecutive newlines to preserve (default: 2)FAQs
Format and prettify HTML email content
We found that @ciolabs/html-email-formatter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.