Commit a93172ee authored by peterhegman's avatar peterhegman

Remove unneeded escape

parent 900c90f0
import validateIpAddress from 'ee/validators/ip_address';
import { escape } from 'lodash';
import { __, sprintf } from '~/locale';
export default address => {
// Reject IP addresses that are only integers to match Ruby IPAddr
// https://github.com/whitequark/ipaddr.js/issues/7#issuecomment-158545695
if (/^\d+$/.exec(address) || !validateIpAddress(address)) {
return sprintf(
__('%{address} is an invalid IP address range'),
{ address: escape(address) },
false,
);
return sprintf(__('%{address} is an invalid IP address range'), { address }, false);
}
return '';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment