Comparing version 3.0.3 to 3.0.4
11
index.js
@@ -106,3 +106,3 @@ var fs = require('fs'); | ||
// Remove empty tags | ||
if (!$(this).text().trim()) { | ||
if (!$(this).html().trim()) { | ||
if (!_.includes(rules.allowedEmpty, tagName)) { | ||
@@ -135,2 +135,3 @@ return $(this).remove(); | ||
delete attributes[key]; | ||
continue; | ||
} | ||
@@ -143,4 +144,10 @@ // Filter schemes | ||
}); | ||
if (!allowedLink) delete attributes[key]; | ||
if (!allowedLink) { | ||
delete attributes[key]; | ||
continue; | ||
} | ||
} | ||
// Replace line-breaks in attributes | ||
attributes[key] = attributes[key].replace(/[\n\r\t\v]/g, ' ').trim(); | ||
} | ||
@@ -147,0 +154,0 @@ }); |
{ | ||
"name": "brightml", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "Smart utility rendering markdown-ready HTML", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32897
804