Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

List of dangerous HTML character encoding labels

License

NotificationsYou must be signed in to change notification settings

wooorm/html-dangerous-encodings

Repository files navigation

BuildCoverageSize

List of dangerous HTML character encoding labels.

Contents

What is this?

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

When should I use this?

Probably never!Maybe when building an HTML linter.

Install

This package isESM only.In Node.js (version 14.14+, 16.0+), install withnpm:

npm install html-dangerous-encodings

In Deno withesm.sh:

import{htmlDangerousEncodings}from'https://esm.sh/html-dangerous-encodings@2'

In browsers withesm.sh:

<scripttype="module">import{htmlDangerousEncodings}from'https://esm.sh/html-dangerous-encodings@2?bundle'</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 identifierhtmlDangerousEncodings.There is no default export.

htmlDangerousEncodings

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

Types

This package is fully typed withTypeScript.It exports no additional types.

Compatibility

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

Security

This package is safe.

Related

Contribute

Yes please!SeeHow to Contribute to Open Source.

License

MIT ©Titus Wormer

About

List of dangerous HTML character encoding labels

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp