{"repo":"azu/safe-marked","free":true,"listed":false,"github":"https://github.com/azu/safe-marked","clone":"git clone https://github.com/azu/safe-marked.git","description":"Markdown to HTML using marked and DOMPurify. Safe by default.","language":"TypeScript","stars":51,"topics":["markdown","html","xss","sanitize","safe","converter"],"license":"MIT","category":"productivity","readme_excerpt":"safe-marked Convert Markdown to HTML using marked and DOMPurify. Motivation marked does not sanitized by default. Also, marked will remove sanitize option in the future. We want to get safe and easy library that convert Markdown to HTML. Features - Convert Markdown to HTML using marked - Safe by default - The output is sanitized by DOMPurify - Type Safe by default - This library is written by TypeScript - Work on Browser and Node.js Size package size minified gzipped safe-marked 90.15 KB 39.36 KB 13.82 KB (browser bundle size) marked@0.7.0 45.05 KB 23.87 KB 7.87 KB dompurify@1.0.11 45.21 KB 15.3 KB 5.99 KB # Other Markdown library markdown-it@9.0.0 325.52 KB 92.69 KB 32.77 KB showdown@1.9.0 157.28 KB 71.06 KB 23.55 KB Install Install with npm: npm install safe-marked Usage The output is sanitized by default. Options You can pass options for these library. - marked : See marked's options - onInit(marked: Marked): unknown : You can use onInit to customize marked instance. - It is useful to add a plugin to marked . - dompurify : See DOMPurify's options An example for options: FAQ Does safe-marked always include jsdom? No. safe-marked has two type of entry point. - Node.js - Browser Browser entrypoint does not includes jsdom. (just use marked + dompurify) - Automatically include jsdom? · Issue #5 · azu/safe-marked Browser demo: Changelog See Releases page. Running tests Install devDependencies and Run npm test : npm test Contributing Pull requests and stars are always welcome. Fo","default_branch":null,"files":null,"tree":[],"storefront":"/r/azu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/azu/safe-marked/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}