From c723aefdfeb1e690282d5a5e01de7531f53a42f3 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Feb 2013 01:10:47 +0000 Subject: [PATCH] when exporting HTML include html and body --- src/node/db/API.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/node/db/API.js b/src/node/db/API.js index 07141fec..9a224843 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -243,6 +243,8 @@ exports.getHTML = function(padID, rev, callback) exportHtml.getPadHTML(pad, rev, function(err, html) { if(ERR(err, callback)) return; + html = "" +html; // adds HTML head + html += ""; data = {html: html}; callback(null, data); }); @@ -253,9 +255,9 @@ exports.getHTML = function(padID, rev, callback) exportHtml.getPadHTML(pad, undefined, function (err, html) { if(ERR(err, callback)) return; - + html = "" +html; // adds HTML head + html += ""; data = {html: html}; - callback(null, data); }); }