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

marked-mangle

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marked-mangle

marked mangle extension

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
63K
decreased by-13.52%
Maintainers
1
Weekly downloads
 
Created
Source

marked-mangle

Mangle mailto links with HTML character references.

Mangling mailto links in this way is useful when you want to prevent email harvesting bots from collecting email addresses from your website, in the case that the Markdown is server-rendered. It's also useful for preventing the browser from automatically opening the user's default email client when clicking on a mailto link.

Usage

import { marked } from "marked";
import { mangle } from "marked-mangle";

// or UMD script
// <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
// <script src="https://cdn.jsdelivr.net/npm/marked-mangle/lib/index.umd.js"></script>

marked.use(mangle());

marked.parse("email@example.com");
// <p><a href="mailto:&#101;&#109;&#97;&#x69;&#x6c;&#x40;&#101;&#120;&#x61;&#x6d;&#x70;&#x6c;&#x65;&#46;&#x63;&#x6f;&#109;">&#101;&#109;&#97;&#x69;&#x6c;&#x40;&#101;&#120;&#x61;&#x6d;&#x70;&#x6c;&#x65;&#46;&#x63;&#x6f;&#109;</a></p>

Keywords

FAQs

Package last updated on 07 Aug 2023

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