mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-27 02:34:52 -06:00
fa9ae9437c
The gitbook install has been incredibly flaky due to it's dependency on npm. This commit simply vendors the node_modules so that each time we build the site the process doesn't have to re-run gitbook install. Signed-off-by: Torin Sandall <torinsandall@gmail.com>
22 lines
468 B
Markdown
22 lines
468 B
Markdown
# html-escape
|
|
|
|
Escape a string to be safe for use in HTML by escaping [reserved
|
|
characters](http://www.w3.org/International/questions/qa-escapes#use)
|
|
(`&<>'"`).
|
|
|
|
# Example
|
|
|
|
```js
|
|
> var escape = require("html-escape");
|
|
> var xssAttempt = "Hello <script>while(1);</script> world!";
|
|
> // Output safe html
|
|
> console.log("<p>" + escape(xssAttempt) + "</p>");
|
|
"<p>Hello <script>while(1);</script> world!</p>"
|
|
```
|
|
|
|
# Installation
|
|
|
|
```
|
|
npm install html-escape
|
|
```
|