Isn't there an escape method you can use for this? (IIRC you added one, but I'm not up to there in the diff yet to make sure)