Fix escape_once not escaping single quotes and double-escaping hex-encoded entities