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

https://github.com/chrissy-dev/escapehtml

An extremely lightweight way to escape HTML elements with JavaScript
https://github.com/chrissy-dev/escapehtml

Last synced: 11 months ago
JSON representation

An extremely lightweight way to escape HTML elements with JavaScript

Awesome Lists containing this project

README

          

# Escape HTML

> An extremely light way to set elements innerHTML as textContent.

## Usage

```HTML

```

Initialise
```javascript
// Escape all innerHTML content from elements
var rawElement = escapeHTML('code')

// Escape all innerHTML content from elements with given class
var withClass = escapeHTML('.escaped')
```