refactor Pad.js; remove joose dependency

This commit is contained in:
booo 2011-12-23 22:06:04 +01:00
parent 8ac872bea8
commit f05fc7ba31
5 changed files with 431 additions and 466 deletions

7
node/utils/cleantext.js Normal file
View file

@ -0,0 +1,7 @@
/**
* Copied from the Etherpad source code. It converts Windows line breaks to Unix line breaks and convert Tabs to spaces
* @param txt
*/
exports.cleanText = function (txt) {
return txt.replace(/\r\n/g,'\n').replace(/\r/g,'\n').replace(/\t/g, ' ').replace(/\xa0/g, ' ');
};