More fixes to advanced search: date formatting and escape sequences