0.2.6 • Published 7 years ago

md.js v0.2.6

Weekly downloads
261
License
MIT
Repository
github
Last release
7 years ago

MD.js

  • ~1kb minified+gzipped
  • ~1.5kb minified

npm licence

MD is a lightweight markdown parser with default support for langauge specific code blocks and XSS filtering, for example

// replace . with `
```javascript
	var int = 0;
will output the following

```html
<pre><code class="language-javascript">
	var int = 0;
</code></pre>

XSS attempt <script>alert(1);</script> will be converted to &lt;script&gt;alert(1)&lt;/script&gt; while <a href="javascript:alert('xss')"></a> will be converted to <a href="#javascript&#58;alert('xss')"></a> and <img onerror="alert(1)"> inline events will be remove and more.

Browser Support

  • Edge
  • IE 8+
  • Chrome
  • Firefox
  • Safari

Installation

direct download

<script src=md.min.js></script>

CDN

<script src=https://unpkg.com/md.js@0.2.6/md.min.js></script>

npm

npm install md.js --save

Useage

md('# Heading...');

Examples

demo

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.0-reserved

8 years ago