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

filterhtml

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filterhtml - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

4

lib/FilterHTML.js

@@ -787,2 +787,6 @@ var FilterHTML = (function() {

if (this.allowed_schemes.indexOf('//') < 0 && url.charAt(0) === '/' && url.charAt(1) === '/') {
return '#'; // disallow protocol-relative URLs (possible XSS vector)
}
parts = url.split(':');

@@ -789,0 +793,0 @@ scheme = '';

2

package.json

@@ -5,3 +5,3 @@ {

"description": "FilterHTML: A whitelisting HTML filter for Python and JavaScript",
"version": "0.3.3",
"version": "0.3.4",
"repository": {

@@ -8,0 +8,0 @@ "url": "https://github.com/dcollien/FilterHTML"

@@ -87,4 +87,5 @@ FilterHTML

e.g.
<pre>
{

@@ -102,3 +103,2 @@ 'div': {

},
'span': {

@@ -112,3 +112,3 @@ # class filtering (a list of allowed matches, strings, regex or functions):

}
</pre>
### Text filtering/modification

@@ -115,0 +115,0 @@ - Text (between tags) can be filtered or modified with a delegate function. This function is passed each string of text between tags, as well as a list of the tags this string is inside (and their attributes). The string is replaced with the output of this function, and it is also filtered according to the supplied white-list specification.

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