Comparing version 0.3.1 to 0.3.2
@@ -140,5 +140,5 @@ (function () { | ||
if (Object.prototype.hasOwnProperty.call(this.attr, name)) | ||
s += " " + name + '="' + this.attr[name] + '"'; | ||
s += " " + name + '="' + escapeXML(this.attr[name]) + '"'; | ||
var finalVal = this.val.trim().replace(/</g, "<").replace(/>/g, ">").replace(/&/g, '&'); | ||
var finalVal = escapeXML(this.val.trim()); | ||
@@ -236,2 +236,7 @@ if (options && options.trimmed && finalVal.length > 25) | ||
// escapes XML entities like "<", "&", etc. | ||
function escapeXML(value){ | ||
return value.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, '&').replace(/'/g, ''').replace(/"/g, '"'); | ||
} | ||
// Are we being used in a Node-like environment? | ||
@@ -238,0 +243,0 @@ if (typeof module !== 'undefined' && module.exports) |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"main": "./index", | ||
@@ -12,0 +12,0 @@ "dependencies": { |
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
17336
232