Refs #58 - Stripped embed tags.

pull/61/head
Nicolas Perriault 9 years ago
parent 6ad9dd9952
commit cf3dce6cf2

@ -344,6 +344,7 @@ Readability.prototype = {
// Clean out junk from the article content
this._cleanConditionally(articleContent, "form");
this._clean(articleContent, "object");
this._clean(articleContent, "embed");
this._clean(articleContent, "h1");
// If there is only one h2, they are probably using it as a header

@ -26,6 +26,7 @@
<object data="foo.swf" type="application/x-shockwave-flash" width="88" height="31">
<param movie="foo.swf" />
</object>
<embed src="foo.swf">
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

@ -30,7 +30,7 @@ var Readability = scopeContext.Readability;
var JSDOMParser = scopeContext.JSDOMParser;
function readFile(path) {
return fs.readFileSync(path, {encoding: "utf-8"});
return fs.readFileSync(path, {encoding: "utf-8"}).trim();
}
function readJSON(path) {

Loading…
Cancel
Save