Single quotes have to be escaped as well

Looks like I missed out on a need to escape single quotes as well, when escaping IDs.