Add id selector escaping
Refactor escaping function to include all unsupported characters