Hostname should also be passed through safe_str