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

htmlparser-to-html

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmlparser-to-html - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

19

index.js

@@ -26,3 +26,10 @@ var emptyTags = {

var config = {
disableAttribEscape: false
};
function escapeAttrib(s) {
if (config.disableAttribEscape === true)
return s.toString();
// null or undefined

@@ -39,3 +46,3 @@ if(s == null) { return ''; }

function html(item, parent, eachFn) {
var html = function(item, parent, eachFn) {
// apply recursively to arrays

@@ -92,2 +99,12 @@ if(Array.isArray(item)) {

html.configure = function (userConfig) {
if(userConfig !== undefined) {
for (k in config) {
if (userConfig[k] !== undefined){
config[k] = userConfig[k];
}
}
}
}
module.exports = html;

4

package.json
{
"name": "htmlparser-to-html",
"version": "0.0.5",
"version": "0.0.6",
"description": "Converts the JSON that the htmlparser/htmlparser2 package produces back to HTML.",

@@ -20,3 +20,3 @@ "main": "index.js",

"author": "Mikito Takada <mikito.takada@gmail.com>",
"license": "BSD",
"license": "BSD-3-Clause",
"readmeFilename": "readme.md",

@@ -23,0 +23,0 @@ "devDependencies": {

@@ -19,2 +19,8 @@ # htmlparser-to-html

### Configuration
htmlparser-to-html can be configured with the `configure(config_object)`. The following configuration parmeters are available:
- `disableAttribEscape`: Set to `true` to disable escaping the attribute values. (default is `false`)
## Usage

@@ -44,3 +50,7 @@

### Example configuration
var html = require('htmlparser-to-html');
html.configure({disableAttribEscape: true);
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