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

gumbo-parser

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gumbo-parser - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

test/custom-tags.html

2

package.json
{
"name": "gumbo-parser",
"version": "0.1.5",
"version": "0.1.6",
"author": "Karl Westin <karl.westin@gmail.com>",

@@ -5,0 +5,0 @@ "description": "Parsing HTML using google gumbo parser",

@@ -43,4 +43,7 @@ # Gumbo Parser

tagName (string) (normalized to lowercase)
originalTag (string) original text from tag
originalTagEnd (string) original closing tag from original text, if there was one
children (array) -> replicating childNodes rather than children,
ie all text / comment children are included
tagNamespace (string) "HTML", "SVG" or "MATHML"
attributes (array)

@@ -98,2 +101,5 @@

**0.1.6** Adding originalTag, originalTagName and tagNamespace
if the tag is unknown, parse originalTag and set in as tag
**0.1.5** Updating the gumbo-parser to the latest version. This includes some security fixes, and if you use this

@@ -100,0 +106,0 @@ for user content, please update.

@@ -10,3 +10,2 @@ var gumbo = require("../node-gumbo");

var root = output.root;
console.log(output);

@@ -62,1 +61,12 @@ assert(!!output, "should return a value");

});
reader("/custom-tags.html", function(text) {
console.log("Running: custom tags");
var root = gumbo(text).root;
assert.equal(root.childNodes[1].childNodes[1].tagName, "background");
assert(/^<background/.test(root.childNodes[1].childNodes[1].originalTag));
console.log("Handles custom tags");
console.log("...done!");
});

Sorry, the diff of this file is not supported yet

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