<commit_before># showdown-xss-filter

[Showdown](https://github.com/showdownjs/showdown) extension to filter XSS, using [leizongmin/js-xss](https://github.com/leizongmin/js-xss).

## Client-side

```html
<script src="/path/to/showdown/src/showdown.js"></script>
<script src="/path/to/xss/dist/xss.min.js"></script>
<script src="/path/to/showdown-xss-filter.js"></script>
```

```javascript
var converter = new showdown.Converter({ extensions: ['xssfilter'] })
var text = "<script>alert('xss!')</script>";
console.log(converter.makeHtml(text));
```
<commit_msg>Adding npm badge to README.<commit_after># showdown-xss-filter

[Showdown](https://github.com/showdownjs/showdown) extension to filter XSS, using [leizongmin/js-xss](https://github.com/leizongmin/js-xss).

[![npm version](https://badge.fury.io/js/showdown-xss-filter.svg)](http://badge.fury.io/js/showdown-xss-filter)

## Client-side

```html
<script src="/path/to/showdown/src/showdown.js"></script>
<script src="/path/to/xss/dist/xss.min.js"></script>
<script src="/path/to/showdown-xss-filter.js"></script>
```

```javascript
var converter = new showdown.Converter({ extensions: ['xssfilter'] })
var text = "<script>alert('xss!')</script>";
console.log(converter.makeHtml(text));
```

{'fraction_non_alphanumeric': 0.21732157177225342, 'fraction_numerical': 0.0, 'mean_word_length': 5.638297872340425, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '994343', 'n_tokens_mistral': 470, 'n_tokens_neox': 454, 'n_words': 62}