<%!
public String htmln(String ftbbs)
{  String htmlftbbs;
   ftbbs = htmlz(ftbbs,"&lt;","<");
   ftbbs = htmlz(ftbbs,"&gt;",">");
   ftbbs = htmlz(ftbbs,"<br>","\n");
   ftbbs = htmlz(ftbbs,"&nbsp;"," ");
   return ftbbs;
}
public String htmlz(String str,String newstr,String oldstr)
{

 int find = -1;
 int oldrep = oldstr.length();
 
 do{
 find = str.indexOf(oldstr);

 if(find != -1)
    str = str.substring(0,find) + newstr + str.substring(find+oldrep);

   }while(find != -1);

  return str;
}
%>