Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
character-entities
Advanced tools
Package description
The character-entities npm package provides a comprehensive list of character entity references (like & for an ampersand or < for a less-than sign) that can be used in HTML and XML. This package is particularly useful for encoding or decoding character entities in text processing, ensuring that special characters are correctly represented in web pages or XML documents.
Accessing Character Entities
This feature allows you to access the character entity for special characters like ampersand (&) and less-than (<) sign. The code sample demonstrates how to import the package and retrieve the character entities for ampersand and less-than sign.
"use strict";
const characterEntities = require('character-entities');
console.log(characterEntities.amp); // Output: '&'
console.log(characterEntities.lt); // Output: '<'
The 'he' package is a robust HTML entity encoder/decoder written in JavaScript. Unlike character-entities, which primarily provides a list of character entities, 'he' offers functions to encode and decode HTML entities, making it more versatile for handling HTML content.
Similar to 'he', the 'entities' package offers encoding and decoding functionalities for HTML entities. It supports a wide range of entities and provides more comprehensive parsing and serialization options compared to character-entities, which is more focused on providing a list of entities.
Readme
HTML character entity information.
npm:
npm install character-entities
var characterEntities = require('character-entities')
console.log(characterEntities.AElig) // => 'Æ'
console.log(characterEntities.aelig) // => 'æ'
console.log(characterEntities.amp) // => '&'
Mapping between (case-sensitive) character entity names to replacements.
See html.spec.whatwg.org
.
character-entities-html4
— HTML 4 character entity infocharacter-entities-legacy
— Legacy character entity infoparse-entities
— Parse HTML character referencesstringify-entities
— Stringify HTML character referencesFAQs
Map of named character references
The npm package character-entities receives a total of 7,900,339 weekly downloads. As such, character-entities popularity was classified as popular.
We found that character-entities demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.