Socket
Socket
Sign inDemoInstall

css-revealer

Package Overview
Dependencies
37
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.7 to 1.0.8

4

lib/isSelectorInString.js

@@ -13,7 +13,7 @@ 'use strict';

if (isId(selector)) {
return new RegExp('id="[^"]*' + sanitise(selector)).test(string);
return new RegExp('id="[^"]*\\b' + sanitise(selector) + '\\b').test(string);
}
if (isClass(selector)) {
return new RegExp('class="[^"]*' + sanitise(selector)).test(string);
return new RegExp('class="[^"]*\\b' + sanitise(selector) + '\\b').test(string);
}

@@ -20,0 +20,0 @@

{
"name": "css-revealer",
"version": "1.0.7",
"version": "1.0.8",
"description": "Reveal CSS selector usage within HTML templates.",

@@ -5,0 +5,0 @@ "bin": {

@@ -16,1 +16,7 @@ 'use strict';

});
test('should correctly match at word boundaries', function(t){
t.plan(2);
t.notOk(isSelectorInString('.myClass', readFixture('templateOne.html')));
t.notOk(isSelectorInString('.MyClass', readFixture('templateOne.html')));
});

Sorry, the diff of this file is not supported yet

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