JavaScript string escape

Backslashes, quotes, newlines, and common control characters are handled.