Rename the formulize_escape function to formulize_db_escape and fix double escape issue.