public static final String htmlToCode(String s)
{
if(s == null)
{
return "";
} else
{ s = s.replace("\n\r", "<br> ");
s = s.replace("\r\n", "<br> ");//这才是正确的!
s= s.replace("\t", " ");
s =s.replace(" ", " ");
s=s.replace("\"", "\\"+"\"");//如果原文含有双引号,这一句最关键!!!!!!
return s;
}
}
{
if(s == null)
{
return "";
} else
{ s = s.replace("\n\r", "<br> ");
s = s.replace("\r\n", "<br> ");//这才是正确的!
s= s.replace("\t", " ");
s =s.replace(" ", " ");
s=s.replace("\"", "\\"+"\"");//如果原文含有双引号,这一句最关键!!!!!!
return s;
}
}