Socket
Socket
Sign inDemoInstall

nwmatcher

Package Overview
Dependencies
0
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0 to 1.4.1

2

package.json
{
"name": "nwmatcher",
"version": "1.4.0",
"version": "1.4.1",
"description": "A CSS3-compliant JavaScript selector engine.",

@@ -5,0 +5,0 @@ "homepage": "http://javascript.nwbox.com/NWMatcher/",

@@ -8,5 +8,5 @@ /*

* Author: Diego Perini <diego.perini at gmail com>
* Version: 1.4.0
* Version: 1.4.1
* Created: 20070722
* Release: 20170520
* Release: 20170610
*

@@ -32,3 +32,3 @@ * License:

var version = 'nwmatcher-1.4.0',
var version = 'nwmatcher-1.4.1',

@@ -120,6 +120,11 @@ doc = global.document,

INSENSITIVE_MAP = {
'class': 0,
'href': 1, 'lang': 1, 'src': 1, 'style': 1, 'title': 1,
'type': 1, 'xmlns': 1, 'xml:lang': 1, 'xml:space': 1
HTML_TABLE = {
'accept': 1, 'accept-charset': 1, 'align': 1, 'alink': 1, 'axis': 1,
'bgcolor': 1, 'charset': 1, 'checked': 1, 'clear': 1, 'codetype': 1, 'color': 1,
'compact': 1, 'declare': 1, 'defer': 1, 'dir': 1, 'direction': 1, 'disabled': 1,
'enctype': 1, 'face': 1, 'frame': 1, 'hreflang': 1, 'http-equiv': 1, 'lang': 1,
'language': 1, 'link': 1, 'media': 1, 'method': 1, 'multiple': 1, 'nohref': 1,
'noresize': 1, 'noshade': 1, 'nowrap': 1, 'readonly': 1, 'rel': 1, 'rev': 1,
'rules': 1, 'scope': 1, 'scrolling': 1, 'selected': 1, 'shape': 1, 'target': 1,
'text': 1, 'type': 1, 'valign': 1, 'valuetype': 1, 'vlink': 1
},

@@ -491,2 +496,5 @@

else if ((match = selector.match(Patterns.attribute))) {
expr = match[1].split(':');
expr = expr.length == 2 ? expr[1] : expr[0] + '';
if (match[2] && !Operators[match[2]]) {

@@ -499,4 +507,3 @@ emit('Unsupported operator in attribute selectors "' + selector + '"');

match[4] = (/\\/).test(match[4]) ? convertEscapes(match[4]) : match[4];
INSENSITIVE_MAP['class'] = QUIRKS_MODE ? 1 : 0;
type = INSENSITIVE_MAP[match[1].toLowerCase()];
type = XML_DOCUMENT ? 0 : HTML_TABLE[expr.toLowerCase()];
test = test.replace(/\%m/g, type ? match[4].toLowerCase() : match[4]);

@@ -503,0 +510,0 @@ } else if (match[2] == '!=' || match[2] == '=') {

@@ -8,5 +8,5 @@ /*

* Author: Diego Perini <diego.perini at gmail com>
* Version: 1.4.0
* Version: 1.4.1
* Created: 20070722
* Release: 20170520
* Release: 20170610
*

@@ -32,3 +32,3 @@ * License:

var version = 'nwmatcher-1.4.0',
var version = 'nwmatcher-1.4.1',

@@ -123,6 +123,11 @@ doc = global.document,

INSENSITIVE_MAP = {
'class': 0,
'href': 1, 'lang': 1, 'src': 1, 'style': 1, 'title': 1,
'type': 1, 'xmlns': 1, 'xml:lang': 1, 'xml:space': 1
HTML_TABLE = {
'accept': 1, 'accept-charset': 1, 'align': 1, 'alink': 1, 'axis': 1,
'bgcolor': 1, 'charset': 1, 'checked': 1, 'clear': 1, 'codetype': 1, 'color': 1,
'compact': 1, 'declare': 1, 'defer': 1, 'dir': 1, 'direction': 1, 'disabled': 1,
'enctype': 1, 'face': 1, 'frame': 1, 'hreflang': 1, 'http-equiv': 1, 'lang': 1,
'language': 1, 'link': 1, 'media': 1, 'method': 1, 'multiple': 1, 'nohref': 1,
'noresize': 1, 'noshade': 1, 'nowrap': 1, 'readonly': 1, 'rel': 1, 'rev': 1,
'rules': 1, 'scope': 1, 'scrolling': 1, 'selected': 1, 'shape': 1, 'target': 1,
'text': 1, 'type': 1, 'valign': 1, 'valuetype': 1, 'vlink': 1
},

@@ -541,2 +546,4 @@

else if ((match = selector.match(Patterns.attribute))) {
expr = match[1].split(':');
expr = expr.length == 2 ? expr[1] : expr[0] + '';
if (match[2] && !Operators[match[2]]) {

@@ -549,4 +556,3 @@ emit('Unsupported operator in attribute selectors "' + selector + '"');

match[4] = (/\\/).test(match[4]) ? convertEscapes(match[4]) : match[4];
INSENSITIVE_MAP['class'] = QUIRKS_MODE ? 1 : 0;
type = INSENSITIVE_MAP[match[1].toLowerCase()];
type = XML_DOCUMENT ? 0 : HTML_TABLE[expr.toLowerCase()];
test = test.replace(/\%m/g, type ? match[4].toLowerCase() : match[4]);

@@ -553,0 +559,0 @@ } else if (match[2] == '!=' || match[2] == '=') {

@@ -8,5 +8,5 @@ /*

* Author: Diego Perini <diego.perini at gmail com>
* Version: 1.4.0
* Version: 1.4.1
* Created: 20070722
* Release: 20170520
* Release: 20170610
*

@@ -32,3 +32,3 @@ * License:

var version = 'nwmatcher-1.4.0',
var version = 'nwmatcher-1.4.1',

@@ -381,6 +381,4 @@ // processing context & root element

HTML_TABLE = {
// class attribute must be treated case-insensitive in HTML quirks mode
// initialized by default to Standard Mode (case-sensitive),
// set dynamically by the attribute resolver
'class': 0,
// NOTE: class name attribute selectors must always be treated using a
// case-sensitive match, this has changed from previous specifications
'accept': 1, 'accept-charset': 1, 'align': 1, 'alink': 1, 'axis': 1,

@@ -396,12 +394,2 @@ 'bgcolor': 1, 'charset': 1, 'checked': 1, 'clear': 1, 'codetype': 1, 'color': 1,

// the following attributes must be treated case-insensitive in XHTML mode
// Niels Leenheer http://rakaz.nl/item/css_selector_bugs_case_sensitivity
XHTML_TABLE = {
'accept': 1, 'accept-charset': 1, 'alink': 1, 'axis': 1,
'bgcolor': 1, 'charset': 1, 'codetype': 1, 'color': 1,
'enctype': 1, 'face': 1, 'hreflang': 1, 'http-equiv': 1,
'lang': 1, 'language': 1, 'link': 1, 'media': 1, 'rel': 1,
'rev': 1, 'target': 1, 'text': 1, 'type': 1, 'vlink': 1
},
/*-------------------------- REGULAR EXPRESSIONS ---------------------------*/

@@ -1128,5 +1116,4 @@

match[4] = (/\\/).test(match[4]) ? convertEscapes(match[4]) : match[4];
// case treatment depends on document
HTML_TABLE['class'] = QUIRKS_MODE ? 1 : 0;
type = (XML_DOCUMENT ? XHTML_TABLE : HTML_TABLE)[expr.toLowerCase()];
// case treatment depends on document type
type = XML_DOCUMENT ? 0 : HTML_TABLE[expr.toLowerCase()];
test = test.replace(/\%m/g, type ? match[4].toLowerCase() : match[4]);

@@ -1133,0 +1120,0 @@ } else if (match[2] == '!=' || match[2] == '=') {

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