html-to-text
Advanced tools
Comparing version 1.6.1 to 1.6.2
# Changelog | ||
## Version 1.6.2 | ||
* Fixed: correctly handle HTML entities for images #82 | ||
## Version 1.6.1 | ||
@@ -4,0 +8,0 @@ |
@@ -24,3 +24,3 @@ var _ = require('underscore'); | ||
if (attribs.alt) { | ||
result += attribs.alt; | ||
result += helper.decodeHTMLEntities(attribs.alt); | ||
if (attribs.src) { | ||
@@ -27,0 +27,0 @@ result += ' '; |
{ | ||
"name": "html-to-text", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "Advanced html to plain text converter", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -117,4 +117,11 @@ var expect = require('chai').expect; | ||
}) | ||
it('should replace entities inside `alt` attributes of images', function () { | ||
var html = '<img src="test.png" alt=""Awesome"">' | ||
var result = htmlToText.fromString(html) | ||
expect(result).to.equal('"Awesome" [test.png]') | ||
}) | ||
}) | ||
}); |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
45308
558
0