Socket
Socket
Sign inDemoInstall

smartquotes

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.0.3

2

package.json
{
"name": "smartquotes",
"version": "2.0.2",
"version": "2.0.3",
"author": "Kelly Martin",

@@ -5,0 +5,0 @@ "contributors": [

@@ -13,3 +13,3 @@ (function (root, factory) {

function smartquotes(context) {
if (typeof context === 'undefined') {
if (typeof document !== 'undefined' && typeof context === 'undefined') {
var run = function() { smartquotes.element(document.body); };

@@ -32,3 +32,3 @@ // if called without arguments, run on the entire body after the document has loaded

return smartquotes.string(context);
} else if (context instanceof HTMLElement) {
} else {
return smartquotes.element(context);

@@ -55,3 +55,3 @@ }

smartquotes.element = function(root) {
var TEXT_NODE = Element.TEXT_NODE || 3;
var TEXT_NODE = typeof Element !== 'undefined' && Element.TEXT_NODE || 3;

@@ -61,3 +61,3 @@ handleElement(root);

function handleElement(el) {
if (['CODE', 'PRE', 'SCRIPT', 'STYLE'].indexOf(el.nodeName) !== -1) {
if (['CODE', 'PRE', 'SCRIPT', 'STYLE'].indexOf(el.nodeName.toUpperCase()) !== -1) {
return;

@@ -64,0 +64,0 @@ }

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