Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
remark-external-links
Advanced tools
Deprecated: this package is no longer maintained. Please use `remark-rehype` to move from remark (markdown) to rehype (HTML) and then replace `remark-external-links` with [`rehype-external-links`][rehype-external-links].
The remark-external-links package is a plugin for the Remark Markdown processor that automatically modifies links in Markdown files. It is primarily used to add attributes like target and rel to external links, enhancing security and usability without manual HTML tagging.
Adding attributes to external links
This feature allows users to automatically add specific attributes such as target='_blank' and rel='nofollow noopener noreferrer' to external links in Markdown content. This enhances security by preventing tabnapping and improves SEO through 'nofollow'. The code sample demonstrates how to set up the plugin with Remark to process a simple Markdown string.
const remark = require('remark');
const html = require('remark-html');
const externalLinks = require('remark-external-links');
remark()
.use(externalLinks, {target: '_blank', rel: ['nofollow', 'noopener', 'noreferrer']})
.use(html)
.process('Check out [Google](https://google.com)!', function (err, file) {
console.log(String(file));
});
Similar to remark-external-links, rehype-external-links is a plugin but for Rehype, which processes HTML instead of Markdown. It offers similar functionalities in terms of adding attributes to external links in HTML content, making it a suitable alternative for projects that work directly with HTML rather than Markdown.
This is a plugin for the markdown-it parser, which is another popular Markdown processor. Like remark-external-links, it allows the addition of attributes to external links in Markdown files. The main difference lies in the base Markdown processor (markdown-it vs. remark), which might affect the choice depending on other project dependencies and personal preference for Markdown syntax extensions.
Deprecated: this package is no longer maintained.
Please use remark-rehype
to move from remark (markdown) to rehype (HTML)
and then replace remark-external-links
with
rehype-external-links
.
Git is still intact and previous versions can still be used without warnings.
FAQs
Deprecated: this package is no longer maintained. Please use `remark-rehype` to move from remark (markdown) to rehype (HTML) and then replace `remark-external-links` with [`rehype-external-links`][rehype-external-links].
The npm package remark-external-links receives a total of 1,970,051 weekly downloads. As such, remark-external-links popularity was classified as popular.
We found that remark-external-links demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.