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

htmldom

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmldom - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

30

lib/scanner.js

@@ -93,2 +93,3 @@ var REG = require('./reg');

var self = this;
var isVoidEle = false

@@ -124,4 +125,6 @@ if (this.str[0] === '>') {

if (isVoid(dom.name) || attrStr.endsWith('/')) {
dom.type = 'voidtag';
isVoidEle = true
} else {

@@ -133,2 +136,4 @@ dom.type = 'opentag';

}
return isVoidEle
};

@@ -142,16 +147,19 @@

var name = match[1];
this.attrs(name);
match = this.match(REG.RAW_TAG_END(name));
// <textarea auto-height data-wpytyping-a="address2" />
if (!this.attrs(name)) {
match = this.match(REG.RAW_TAG_END(name));
if (match) {
match = match[0];
} else {
match = this.str;
this.str = '';
if (match) {
match = match[0];
} else {
match = this.str;
this.str = '';
}
this.dom.push({
type: 'text',
value: match
})
}
this.dom.push({
type: 'text',
value: match
});
return true;

@@ -158,0 +166,0 @@ } else if (match = this.match(REG.OPEN_TAG)) {

{
"name": "htmldom",
"version": "3.0.2",
"version": "3.0.3",
"description": "Simplified html handle in nodejs",

@@ -5,0 +5,0 @@ "main": "htmldom.js",

@@ -22,2 +22,10 @@ var assert = require('assert');

});
it('textarea closed', function() {
var html = new HtmlDom('<textarea /><view></view>');
assert.equal(html.stringify({
selfClosed: true
}), '<textarea/><view></view>');
});
});
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