Moved colon escaping to proper location and added a test