allow non ascii chars in txt export

This commit is contained in:
John McLear 2013-02-13 18:30:55 +00:00
parent d3f730e2ba
commit be56272e66
4 changed files with 562 additions and 15 deletions

View file

@ -23,7 +23,6 @@ var Security = require('ep_etherpad-lite/static/js/security');
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
var getPadPlainText = require('./ExportHelper').getPadPlainText
var _analyzeLine = require('./ExportHelper')._analyzeLine;
var _encodeWhitespace = require('./ExportHelper')._encodeWhitespace;
function getPadHTML(pad, revNum, callback)
{
@ -596,3 +595,9 @@ function _processSpaces(s){
return parts.join('');
}
function _encodeWhitespace(s){
return s.replace(/[^\x21-\x7E\s\t\n\r]/g, function(c){
return "&#" +c.charCodeAt(0) + ";"
});
}