Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function(data, status) {
if (data.replace(/^\s+|\s+$/g, '') == 'success') {
CARBON.showInfoDialog(jsi18n['valid.address'] + " " + url);
} else if (data.replace(/^\s+|\s+$/g, '') == 'unknown') {
CARBON.showErrorDialog(jsi18n['unknown.address'] + " " + url);
} else if (data.replace(/^\s+|\s+$/g, '') == 'malformed') {
CARBON.showErrorDialog(jsi18n['malformed.address'] + " " + url);
} else if (data.replace(/^\s+|\s+$/g, '') == 'ssl_error') {
CARBON.showErrorDialog(jsi18n['ssl.error'] + " " + url);
} else if (data.replace(/^\s+|\s+$/g, '') == 'unknown_service') {
CARBON.showErrorDialog(jsi18n['unknown.service'] + " " + url);
} else if (data.replace(/^\s+|\s+$/g, '') == 'unsupported') {
CARBON.showErrorDialog(jsi18n['unsupported.protocol']);
} else {
CARBON.showErrorDialog(data);
}
});
}