def make_validation_result(data):
 if (not settings.EXPOSE_VALIDATOR_TRACEBACKS):
  if data['error']:
   data['error'] = _('An error occurred validating the manifest.')
 if data['validation']:
  for msg in data['validation']['messages']:
   for (k, v) in msg.items():
    msg[k] = escape_all(v, linkify=(k in ('message', 'description')))
 return data

def make_validation_result ( data ) : if ( not settings . EXPOSE_VALIDATOR_TRACEBACKS ) : if data [ 'error' ] : data [ 'error' ] = _ ( 'An error occurred validating the manifest.' ) if data [ 'validation' ] : for msg in data [ 'validation' ] [ 'messages' ] : for ( k , v ) in msg . items ( ) : msg [ k ] = escape_all ( v , linkify = ( k in ( 'message' , 'description' ) ) ) return data
safe wrapper around json dict containing a validation result .