def html_params(**kwargs):
 params = []
 for (k, v) in sorted(iteritems(kwargs)):
  if (k in (u'class_', u'class__', u'for_')):
   k = k[:(-1)]
  if (v is True):
   params.append(k)
  else:
   params.append((u'%s="%s"' % (text_type(k), escape(text_type(v), quote=True))))
 return u' '.join(params)

def html_params ( ** kwargs ) : params = [ ] for ( k , v ) in sorted ( iteritems ( kwargs ) ) : if ( k in ( u'class_' , u'class__' , u'for_' ) ) : k = k [ : ( - 1 ) ] if ( v is True ) : params . append ( k ) else : params . append ( ( u'%s="%s"' % ( text_type ( k ) , escape ( text_type ( v ) , quote = True ) ) ) ) return u' ' . join ( params )
generate html parameters from inputted keyword arguments .