# escape-xml

> **Escape XML in javascript (NodeJS)**

Latest version **1.0.2** (published 2021-06-24) · SEE LICENSE IN ./LICENSE license · 0 weekly downloads

## Install

```sh
npm install escape-xml
pnpm add escape-xml
yarn add escape-xml
bun add escape-xml
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-06-24 |
| First published | 2021-06-24 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN ./LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Helmuth Lammer |
| Maintainers | helmuthsymptoma |

## Links

- npm: https://www.npmjs.com/package/escape-xml
- npm.io page: https://npm.io/package/escape-xml

## Recent versions

- 1.0.2 (latest) — 2021-06-24
- 1.0.1 — 2021-06-24
- 1.0.0 — 2021-06-24

## README

**Escape XML in javascript (NodeJS)**

Escapes the invalid Markup characters: `&, <, >, ", ' `.

You could also always use **CDATA** escaping: `<![CDATA[` .... `]]>` especially with larger data.

`npm install escape-xml`

```

var xmlescape = require('escape-xml');
xmlescape(' Hello & Good Bye');

//return value
"Hello &amp; Good Bye"

```

If you also need to ignore some characters on purpose you can find a similar package [here](https://www.npmjs.com/package/xml-escape)

---
_Source: https://npm.io/package/escape-xml · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
