Changed string escape to handle single-quoted name attribute