From d5456309124e6f2f4a1ada651758ef783b1adab4 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 28 May 2016 22:25:44 +0100 Subject: fixes #2945 --- src/node/db/API.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/node/db') diff --git a/src/node/db/API.js b/src/node/db/API.js index 237bcb0a..be3e7348 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -28,6 +28,7 @@ var authorManager = require("./AuthorManager"); var sessionManager = require("./SessionManager"); var async = require("async"); var exportHtml = require("../utils/ExportHtml"); +var exportTxt = require("../utils/ExportTxt"); var importHtml = require("../utils/ImportHtml"); var cleanText = require("./Pad").cleanText; var PadDiff = require("../utils/padDiff"); @@ -271,7 +272,8 @@ exports.getText = function(padID, rev, callback) //the client wants the latest text, lets return it to him else { - callback(null, {"text": pad.text()}); + var padText = exportTxt.getTXTFromAtext(pad, pad.atext); + callback(null, {"text": padText}); } }); } -- cgit v1.2.3