function HtmToTxt(tmpInfo){
var str_info=tmpInfo;
if (str_info+"CS"!="CS"){
str_info = str_info.replace(/=/g, "$01@");
str_info = str_info.replace(/&/g, "$02@");
str_info = str_info.replace(/%/g, "$03@");
str_info = str_info.replace(/\(/g, "$04@");
str_info = str_info.replace(/\)/g, "$05@");
str_info = str_info.replace(/>/g, "$06@");
str_info = str_info.replace(/</g, "$07@");
str_info = str_info.replace(/{/g, "$08@");
str_info = str_info.replace(/}/g, "$09@");
str_info = str_info.replace(/,/g, "$10@");
str_info = str_info.replace(/\+/g, "$11@");
str_info = str_info.replace(/\"/g, "$12@");
str_info = str_info.replace(/!/g, "$13@");
str_info = str_info.replace(/\'/g, "$14@");
str_info = str_info.replace(/;/g, "$15@");
str_info = str_info.replace(/\//g, "$16@");
str_info = str_info.replace(/-/g, "$17@");
str_info = str_info.replace(/#/g, "$18@");
str_info = str_info.replace(/\r\n/g, "$25@");
str_info = str_info.replace(/\n/g, "$25@");
str_info = str_info.replace(/ /g, "$26@");
str_info = str_info.replace(/script/gi, "$27@");
str_info = str_info.replace(/select/gi, "$28@");
str_info = str_info.replace(/update/gi, "$29@");
str_info = str_info.replace(/delete/gi, "$30@");
str_info = str_info.replace(/from/gi, "$31@");
str_info = str_info.replace(/where/gi, "$32@");
str_info = str_info.replace(/create/gi, "$33@");
str_info = str_info.replace(/alter/gi, "$34@");
str_info = str_info.replace(/drop/gi, "$35@");
str_info = str_info.replace(/truncate/gi, "$36@");
str_info = str_info.replace(/insert/gi, "$37@");
str_info = str_info.replace(/union/gi, "$38@");
str_info = str_info.replace(/exec/gi, "$39@");
str_info = str_info.replace(/\?/g, "$40@");
str_info = str_info.replace(/\[/g, "$41@");
str_info = str_info.replace(/\]/g, "$42@");
}
return str_info;
}
function TxtToHtm(tmpInfo){
var str_info=tmpInfo;
if ((str_info+"CS").indexOf("&")>-1 && (str_info+"CS").indexOf("¥")>-1){
str_info = str_info.replace(/=/g, "=");
str_info = str_info.replace(/&/g, "&");
str_info = str_info.replace(/%/g, "%");
str_info = str_info.replace(/(/g, "(");
str_info = str_info.replace(/)/g, ")");
str_info = str_info.replace(/>/g, ">");
str_info = str_info.replace(/
str_info = str_info.replace(/{/g, "{");
str_info = str_info.replace(/}/g, "}");
str_info = str_info.replace(/,/g, ",");
str_info = str_info.replace(/+/g, "+");
str_info = str_info.replace(/"/g, "\"");
str_info = str_info.replace(/!/g, "!");
str_info = str_info.replace(/'/g, "'");
str_info = str_info.replace(/;/g, ";");
str_info = str_info.replace(///g, "/");
str_info = str_info.replace(/-/g, "-");
str_info = str_info.replace(/#/g, "#");
str_info = str_info.replace(/ /g, " ");
str_info = str_info.replace(/ /g, " ");
str_info = str_info.replace(/ /g, " ");
str_info = str_info.replace(/"/g, "\"");
str_info = str_info.replace(/'/g, "'");
str_info = str_info.replace(/
/g, "\r\n");
str_info = str_info.replace(/
/g, "\r\n");
str_info = str_info.replace(/
/g, "\r\n");
str_info = str_info.replace(/select/g, "select");
str_info = str_info.replace(/update/g, "update");
str_info = str_info.replace(/delete/g, "delete");
str_info = str_info.replace(/from/g, "from");
str_info = str_info.replace(/where/g, "where");
str_info = str_info.replace(/create/g, "create");
str_info = str_info.replace(/alter/g, "alter");
str_info = str_info.replace(/drop/g, "drop");
str_info = str_info.replace(/truncate/g, "truncate");
str_info = str_info.replace(/insert/g, "insert");
str_info = str_info.replace(/union/g, "union");
str_info = str_info.replace(/exec/g, "exec");
str_info = str_info.replace(/\<script/gi, "<script");
str_info = str_info.replace(/\<\/script\>/gi, "<script");
str_info = str_info.replace(/\<iframe/gi, "<iframe");
str_info = str_info.replace(/\<\/iframe\>/gi, "</iframe>");
}
if ((str_info+"CS").indexOf("$")>-1 && (str_info+"CS").indexOf("@")>-1){
str_info = str_info.replace(/\$01\@/g, "=");
str_info = str_info.replace(/\$02\@/g, "&");
str_info = str_info.replace(/\$03\@/g, "%");
str_info = str_info.replace(/\$04\@/g, "(");
str_info = str_info.replace(/\$05\@/g, ")");
str_info = str_info.replace(/\$06\@/g, ">");
str_info = str_info.replace(/\$07\@/g, "<");
str_info = str_info.replace(/\$08\@/g, "{");
str_info = str_info.replace(/\$09\@/g, "}");
str_info = str_info.replace(/\$10\@/g, ",");
str_info = str_info.replace(/\$11\@/g, "+");
str_info = str_info.replace(/\$12\@/g, "\"");
str_info = str_info.replace(/\$13\@/g, "!");
str_info = str_info.replace(/\$14\@/g, "'");
str_info = str_info.replace(/\$15\@/g, ";");
str_info = str_info.replace(/\$16\@/g, "/");
str_info = str_info.replace(/\$17\@/g, "-");
str_info = str_info.replace(/\$18\@/g, "#");
str_info = str_info.replace(/\$19\@/g, " ");
str_info = str_info.replace(/\$20\@/g, " ");
str_info = str_info.replace(/\$21\@/g, "\"");
str_info = str_info.replace(/\$22\@/g, "'");
str_info = str_info.replace(/\$23\@/g, "\r\n");
str_info = str_info.replace(/\$24\@/g, "\r\n");
str_info = str_info.replace(/\$25\@/g, "\r\n");
str_info = str_info.replace(/\$26\@/g, " ");
str_info = str_info.replace(/\$27\@/g, "script");
str_info = str_info.replace(/\$28\@/g, "select");
str_info = str_info.replace(/\$29\@/g, "update");
str_info = str_info.replace(/\$30\@/g, "delete");
str_info = str_info.replace(/\$31\@/g, "from");
str_info = str_info.replace(/\$32\@/g, "where");
str_info = str_info.replace(/\$33\@/g, "create");
str_info = str_info.replace(/\$34\@/g, "alter");
str_info = str_info.replace(/\$35\@/g, "drop");
str_info = str_info.replace(/\$36\@/g, "truncate");
str_info = str_info.replace(/\$37\@/g, "insert");
str_info = str_info.replace(/\$38\@/g, "union");
str_info = str_info.replace(/\$39\@/g, "exec");
str_info = str_info.replace(/\$40\@/g, "?");
str_info = str_info.replace(/\$41\@/g, "[");
str_info = str_info.replace(/\$42\@/g, "]");
str_info = str_info.replace(/\<script/gi, "<script");
str_info = str_info.replace(/\<\/script\>/gi, "<script");
str_info = str_info.replace(/\<iframe/gi, "<iframe");
str_info = str_info.replace(/\<\/iframe\>/gi, "</iframe>");
}
return str_info;
}