From 7c03bc2610a2d8f0e752bc9796bb460d50166fe9 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 14 Feb 2013 01:13:23 +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 5f8189140..7a9ce41fa 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); }); }