2.0.1 • Published 3 years ago

html-dangerous-encodings v2.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

html-dangerous-encodings

Build Coverage Size

List of dangerous HTML character encoding labels.

Contents

What is this?

This is a list of character encodings that are dangerous according to the spec.

When should I use this?

Probably never! Maybe when building an HTML linter.

Install

This package is ESM only. In Node.js (version 12.20+, 14.14+, or 16.0+), install with npm:

npm install html-dangerous-encodings

In Deno with Skypack:

import {htmlDangerousEncodings} from 'https://cdn.skypack.dev/html-dangerous-encodings@2?dts'

In browsers with Skypack:

<script type="module">
  import {htmlDangerousEncodings} from 'https://cdn.skypack.dev/html-dangerous-encodings@2?min'
</script>

Use

import {htmlDangerousEncodings} from 'html-dangerous-encodings'

console.log(htmlDangerousEncodings)

Yields:

[
  'hz-gb-2312',
  'csiso2022kr',
  'csiso2022jp',
  'iso-2022-jp',
  'iso-2022-cn',
  'iso-2022-cn-ext',
  'iso-2022-kr',
  'utf-16be',
  'utf-16le'
]

API

This package exports the following identifiers: htmlDangerousEncodings. There is no default export.

htmlDangerousEncodings

List of dangerous HTML character encoding labels (Array<string>)

Types

This package is fully typed with TypeScript.

Compatibility

This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 12.20+, 14.14+, and 16.0+. It also works in Deno and modern browsers.

Security

This package is safe.

Related

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT © Titus Wormer

2.0.1

3 years ago

2.0.0

3 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

8 years ago