Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
ultramarked
Advanced tools
Marked with built-in syntax highlighting and input sanitizing that doesn't encode all HTML
Marked with built-in syntax highlighting and input sanitizing that doesn't encode all HTML.
Ultramarked wraps around marked, so it's essentially Marked, with a few extra options.
$ npm install ultramarked --save
var ultramarked = require('ultramarked');
ultramarked.setOptions({
// your options go here
});
ultramarked('This is **awesome**!');
Syntax highlighting powered by highlight.js, no extra magic. Classes are prefixed hljs
for convenience. Note that the renderer
you choose will be overridden.
As of right now, Marked encodes all HTML input when sanitize = true
. Set this option to true to use the AngularJS Sanitizer sanitizer, tweaked to disallow script and style tags.
If you are using ultrasanitize
, you can pass in an array of strings or regular expressions that match permitted iframe
targets. Regular expressions are tested against user input, and strings are interpreted as the beginning of a URL. This means that an string like 'http://google.com'
will match any URL in the google.com
domain that uses the HTTP
protocol.
Prettifies the code for terminal output! Incompatible with ultralight
, which will be disabled when terminal
is enabled. Also turns off ultrasanitize
, because color codes. Luckily none of that will be an issue when rendering HTML for the terminal!
Angular's sanitizer option might be too lenient for you. If that's the case, you can use PageDown's white-list instead, which is much more narrow, and doesn't allow setting class attributes, for example.
ultramarked.setOptions({
sanitizer: require('pagedown-sanitizer')
});
FAQs
Marked with built-in syntax highlighting and input sanitizing that doesn't encode all HTML
The npm package ultramarked receives a total of 20 weekly downloads. As such, ultramarked popularity was classified as not popular.
We found that ultramarked demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.