Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.0.3

0.0.3

latest commit f11291b754
Paul Vorbach authored
Failed to load latest commit information.
node_modules/append Fix error with remote domains
test Fix error with remote domains
.gitignore Initial commit
.npmignore Initial commit
LICENSE.mkd Initial commit
README.mkd Initial commit
esc.js Fix error with remote domains
package.json 0.0.3

README.mkd

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

Example

var esc = require('esc');

var html = '<a href="../some.html">link</a>';
console.log(esc(html, { uri: 'http://example.com/path/to/document.html' }));

This will print:

&lt;a href=&quot;http://example.com/path/some.html&quot;&gt;
Something went wrong with that request. Please try again.