Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

micromark-util-encode

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark-util-encode

micromark utility to encode dangerous html characters

  • 1.0.0-alpha.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4M
decreased by-41.52%
Maintainers
1
Weekly downloads
 
Created

What is micromark-util-encode?

The micromark-util-encode package is a utility library for encoding HTML entities in text. It is part of the micromark ecosystem, which is a markdown parser compliant with CommonMark. This utility is specifically designed to help with the encoding of characters that have special meaning in HTML, ensuring that text is safely and correctly displayed in an HTML context.

What are micromark-util-encode's main functionalities?

HTML Entity Encoding

This feature allows for the encoding of text containing characters that have special meaning in HTML, such as '<', '>', and '&', into their corresponding HTML entities. This is useful for displaying user-generated content without risking HTML injection vulnerabilities.

"use strict";

var encode = require('micromark-util-encode');

var result = encode('<div>Hello & Welcome</div>');
console.log(result); // Outputs: '&lt;div&gt;Hello &amp; Welcome&lt;/div&gt;'

Other packages similar to micromark-util-encode

Keywords

FAQs

Package last updated on 16 Jun 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc