I have a string message to display which contains special characters but it doesnt print all. For example if I give message like "The P & A company does the work". It prints only "The P".
public void setOutageMsg(String outageMsg) {
//outage msg issue
if(outageMsg==null){
this.outageMsg = outageMsg;
}
else{
outageMsg=outageMsg.replaceAll("&","&").replaceAll("&","%26");
this.outageMsg = outageMsg;
}
}
Similarly, I need to have a single code for all the special characters.