IntelliJ has some automatic String escaping built in.
IntelliJ automatic String escaping on copy/paste
Example: pasting TO IntelliJ
Write some code:
String s = "";
Then paste this sequence between the double quotes: <li><a href="#">
What you have is:
String s = "<li><a href=\"#\">";
IntelliJ intelligently escaped the double quotes for you.
Example: copying FROM IntelliJ
Select the string literal above, including the surrounding double quotes ("<li><a href=\"#\">"), and paste it into Notepad. What you get is exactly that.
Select the string content, excluding the double quotes (<li><a href=\"#\">"), and paste it into Notepad. What you get is the string unescaped: <li><a href="#">
That's pretty smart, and most always what I want.
IntelliJ automatic String escaping on search
Example: ctrl-alt-f searching for <li><a href="#"> does not find our code String s = "<li><a href=\"#\">";
Here's an idea for the IDEA team: how about a checkbox "Find escaped strings"?