| Author |
escaping html characters and a string starting with double quote
|
sony vijay
Ranch Hand
Joined: Jun 27, 2010
Posts: 32
|
|
Hi,
1) Would the following method work to replace html characters? Specially, I am confused with the double quotes. I tried replaceAll("\"", """) for this in the below method. I am not sure if this is right.
2) I need to create a string which starts and ends with double quotes (eg: "sony"). So, do I replace " with \" in my string? For some reason this doesn't seem to work.
String sony = "\"sony\""
Thanks,
Sony
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
|
|
|
You won't manage "\"" and """. You would need to escape both the \ and the ", so try "\\\"" and "\""
|
 |
 |
|
|
subject: escaping html characters and a string starting with double quote
|
|
|