StringBuffer buf = new StringBuffer(input);
int i = 0;
while (i < buf.length())
{
char ch = buf.charAt(i);
switch (ch)
{
case '<":
buf.replace(i,i+1,"<");
break;
case '>":
buf.replace(i,i+1,">");
break;
case '(":
buf.replace(i,i+1,"(");
break;
case ')":
buf.replace(i,i+1,")");
break;
case '#":
buf.replace(i,i+1,"#");
break;
case '&":
buf.replace(i,i+1,"&");
break;
case '\"":
buf.replace(i,i+1,""");
break;
case '\'":
buf.replace(i,i+1,"'");
break;
case '%":
buf.replace(i,i+1,"%");
break;
case ';":
buf.replace(i,i+1,";");
break;
case '+":
buf.replace(i,i+1,"+");
break;
case '-":
buf.replace(i,i+1,"-");
break;
default:
i -= 3;
}
i += 4;
}
return buf.toString();