Socket
Socket
Sign inDemoInstall

filterhtml

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.4 to 0.3.5

11

lib/FilterHTML.js

@@ -785,4 +785,11 @@ var FilterHTML = (function() {

HTMLFilter.prototype.purify_url = function(url) {
var parts, scheme, allowed_scheme;
var parts, scheme, allowed_scheme, escape_char;
// strip out all encoded tag characters
for (escape_char in HTML_ESCAPE_CHARS) {
if (HTML_ESCAPE_CHARS.hasOwnProperty(escape_char)) {
url = url.replace(HTML_ESCAPE_CHARS[escape_char], '');
}
}
if (this.allowed_schemes.indexOf('//') < 0 && url.charAt(0) === '/' && url.charAt(1) === '/') {

@@ -789,0 +796,0 @@ return '#'; // disallow protocol-relative URLs (possible XSS vector)

2

package.json

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

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

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc