Index: lams_tool_wiki/web/includes/javascript/wikiCommon.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_wiki/web/includes/javascript/wikiCommon.js,v diff -u -r1.4 -r1.5 --- lams_tool_wiki/web/includes/javascript/wikiCommon.js 20 Apr 2009 00:11:12 -0000 1.4 +++ lams_tool_wiki/web/includes/javascript/wikiCommon.js 20 Apr 2009 00:51:03 -0000 1.5 @@ -39,8 +39,8 @@ function trim(str) { - var regX1 = /\n/gi; - var regX2 = /\t/gi; + var regX1 = /\r?\n/g; + var regX2 = /\t/g; str = new String(str); str = str.replace(/^\s+|\s+$/g, '').replace(regX1, "").replace(regX2, ""); return str;