Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wordpress/escape-html

Package Overview
Dependencies
Maintainers
10
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/escape-html - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

2

CHANGELOG.md

@@ -1,2 +0,2 @@

## 1.1.1 (Unreleased)
## 1.2.0 (2019-03-20)

@@ -3,0 +3,0 @@ - Add fix for WordPress wptexturize greater-than tokenize bug (see https://core.trac.wordpress.org/ticket/45387)

{
"name": "@wordpress/escape-html",
"version": "1.2.0",
"version": "1.3.0",
"description": "Escape HTML utils.",

@@ -23,3 +23,3 @@ "author": "The WordPress Contributors",

"dependencies": {
"@babel/runtime": "^7.3.1"
"@babel/runtime": "^7.4.4"
},

@@ -29,3 +29,3 @@ "publishConfig": {

},
"gitHead": "1e024a20a20369af7bc9720a676fdd3837a3a105"
"gitHead": "87f92f8f58a14a58b44beff0919734c546b3b975"
}

@@ -19,6 +19,4 @@ # Escape HTML

### escapeAmpersand
<a name="escapeAmpersand" href="#escapeAmpersand">#</a> **escapeAmpersand**
[src/index.js#L33-L35](src/index.js#L33-L35)
Returns a string with ampersands escaped. Note that this is an imperfect

@@ -29,3 +27,3 @@ implementation, where only ampersands which do not appear as a pattern of

**Related**
_Related_

@@ -36,17 +34,15 @@ - <https://w3c.github.io/html/syntax.html#character-references>

**Parameters**
_Parameters_
- **value** `string`: Original string.
- _value_ `string`: Original string.
**Returns**
_Returns_
`string`: Escaped string.
- `string`: Escaped string.
### escapeAttribute
<a name="escapeAttribute" href="#escapeAttribute">#</a> **escapeAttribute**
[src/index.js#L79-L81](src/index.js#L79-L81)
Returns an escaped attribute value.
**Related**
_Related_

@@ -66,17 +62,15 @@ - <https://w3c.github.io/html/syntax.html#elements-attributes>

**Parameters**
_Parameters_
- **value** `string`: Attribute value.
- _value_ `string`: Attribute value.
**Returns**
_Returns_
`string`: Escaped attribute value.
- `string`: Escaped attribute value.
### escapeHTML
<a name="escapeHTML" href="#escapeHTML">#</a> **escapeHTML**
[src/index.js#L95-L97](src/index.js#L95-L97)
Returns an escaped HTML element value.
**Related**
_Related_

@@ -88,51 +82,45 @@ - <https://w3c.github.io/html/syntax.html#writing-html-documents-elements>

**Parameters**
_Parameters_
- **value** `string`: Element value.
- _value_ `string`: Element value.
**Returns**
_Returns_
`string`: Escaped HTML element value.
- `string`: Escaped HTML element value.
### escapeLessThan
<a name="escapeLessThan" href="#escapeLessThan">#</a> **escapeLessThan**
[src/index.js#L55-L57](src/index.js#L55-L57)
Returns a string with less-than sign replaced.
**Parameters**
_Parameters_
- **value** `string`: Original string.
- _value_ `string`: Original string.
**Returns**
_Returns_
`string`: Escaped string.
- `string`: Escaped string.
### escapeQuotationMark
<a name="escapeQuotationMark" href="#escapeQuotationMark">#</a> **escapeQuotationMark**
[src/index.js#L44-L46](src/index.js#L44-L46)
Returns a string with quotation marks replaced.
**Parameters**
_Parameters_
- **value** `string`: Original string.
- _value_ `string`: Original string.
**Returns**
_Returns_
`string`: Escaped string.
- `string`: Escaped string.
### isValidAttributeName
<a name="isValidAttributeName" href="#isValidAttributeName">#</a> **isValidAttributeName**
[src/index.js#L106-L108](src/index.js#L106-L108)
Returns true if the given attribute name is valid, or false otherwise.
**Parameters**
_Parameters_
- **name** `string`: Attribute name to test.
- _name_ `string`: Attribute name to test.
**Returns**
_Returns_
`boolean`: Whether attribute is valid.
- `boolean`: Whether attribute is valid.

@@ -139,0 +127,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc