Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pvorb/node-esc

escapes HTML
https://github.com/pvorb/node-esc

Last synced: about 1 month ago
JSON representation

escapes HTML

Awesome Lists containing this project

README

        

**esc** allows you to quickly escape HTML strings. It is capable of
automatically extending URLs in the HTML for use in feeds.

## Example

```javascript
var esc = require('esc');

var html = 'link';
console.log(esc(html, { uri: 'http://example.com/path/to/document.html' }));
```

This will print:

```
<a href="http://example.com/path/some.html">
```