recover stability but still have a server msg

This commit is contained in:
John McLear 2014-12-27 17:23:13 +01:00
parent 7708460faf
commit 503fc13fda
3 changed files with 1 additions and 3 deletions

View file

@ -416,7 +416,6 @@ exports.setHTML = function(padID, html, callback)
}else{ }else{
//update the clients on the pad //update the clients on the pad
padMessageHandler.updatePadClients(pad, callback); padMessageHandler.updatePadClients(pad, callback);
callback();
return; return;
} }
}); });

View file

@ -22,7 +22,6 @@ var cheerio = require("cheerio");
function setPadHTML(pad, html, callback) function setPadHTML(pad, html, callback)
{ {
var apiLogger = log4js.getLogger("ImportHtml"); var apiLogger = log4js.getLogger("ImportHtml");
console.warn("setting padhtml");
var $ = cheerio.load(html); var $ = cheerio.load(html);
// Appends a line break, used by Etherpad to ensure a caret is available // Appends a line break, used by Etherpad to ensure a caret is available
// below the last line of an import // below the last line of an import

View file

@ -294,7 +294,7 @@ describe('setHTML', function(){
describe('setHTML', function(){ describe('setHTML', function(){
it('Sets the HTML of a Pad attempting to pass ugly HTML', function(done) { it('Sets the HTML of a Pad attempting to pass ugly HTML', function(done) {
var html = "<!DOCTYPE html><html><head></head><body><ul><li>Hello World!</li><li>foo</li></ul></body></html>"; var html = "<!DOCTYPE html><html><head></head><body><ul><li>UL1</li><ul><li>UL2</li></ul></ul></body></html>";
api.get(endPoint('setHTML')+"&padID=test&html="+html) api.get(endPoint('setHTML')+"&padID=test&html="+html)
.expect(function(res){ .expect(function(res){
if(res.body.code !== 0) throw new Error("List HTML cant be imported") if(res.body.code !== 0) throw new Error("List HTML cant be imported")