nice chars n no cruft

pull/1491/head
John McLear 2013-02-13 18:45:45 +00:00
parent dea892213e
commit aefd8d8d0d
1 changed files with 1 additions and 8 deletions

View File

@ -26,7 +26,6 @@ var Security = require('ep_etherpad-lite/static/js/security');
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks'); var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
var getPadPlainText = require('./ExportHelper').getPadPlainText; var getPadPlainText = require('./ExportHelper').getPadPlainText;
var _analyzeLine = require('./ExportHelper')._analyzeLine; var _analyzeLine = require('./ExportHelper')._analyzeLine;
var _encodeWhitespace = require('./ExportHelper')._encodeWhitespace;
// This is slightly different than the HTML method as it passes the output to getTXTFromAText // This is slightly different than the HTML method as it passes the output to getTXTFromAText
function getPadTXT(pad, revNum, callback) function getPadTXT(pad, revNum, callback)
@ -225,7 +224,7 @@ function getTXTFromAtext(pad, atext, authorColors)
// plugins from being able to display * at the beginning of a line // plugins from being able to display * at the beginning of a line
// s = s.replace("*", ""); // Then remove it // s = s.replace("*", ""); // Then remove it
assem.append(_encodeWhitespace(s)); assem.append(s);
} // end iteration over spans in line } // end iteration over spans in line
var tags2close = []; var tags2close = [];
@ -292,9 +291,3 @@ exports.getPadTXTDocument = function (padId, revNum, noDocType, callback)
}); });
} }
function _encodeWhitespace(s) {
return s.replace(/[^\x21-\x7E\s\t\n\r]/g, function(c)
{
return "&#" +c.charCodeAt(0) + ";"
});
}