@@ -628,44 +628,20 @@ def html4_cgi_escape_attrs(**attrs):
628628 for k , v in sorted (attrs .items ())])
629629
630630
631- def xhtml_cgi_escape_attrs (** attrs ):
632- ''' Boolean attributes like 'disabled', 'required'
633- are represented with a value that is the same as
634- the attribute name.. E.G.
635- <input required="required" ...> not <input required ..>
636- The latter is html4 or 5. Recognize booleans by:
637- value is None
638- Code can use None to indicate a pure boolean.
639- '''
640- return ' ' .join (['%s="%s"' % (k , html_escape (str (v ), True ))
641- if v is not None else '%s="%s"' % (k , k )
642- for k , v in sorted (attrs .items ())])
643-
644-
645631def input_html4 (** attrs ):
646632 """Generate an 'input' (html4) element with given attributes"""
647633 _set_input_default_args (attrs )
648634 return '<input %s>' % html4_cgi_escape_attrs (** attrs )
649635
650636
651- def input_xhtml (** attrs ):
652- """Generate an 'input' (xhtml) element with given attributes"""
653- _set_input_default_args (attrs )
654- return '<input %s/>' % xhtml_cgi_escape_attrs (** attrs )
655-
656-
657637class HTMLInputMixin (object ):
658638 """ requires a _client property """
659639 def __init__ (self ):
660640 html_version = 'html4'
661641 if hasattr (self ._client .instance .config , 'HTML_VERSION' ):
662642 html_version = self ._client .instance .config .HTML_VERSION
663- if html_version == 'xhtml' :
664- self .input = input_xhtml
665- self .cgi_escape_attrs = xhtml_cgi_escape_attrs
666- else :
667- self .input = input_html4
668- self .cgi_escape_attrs = html4_cgi_escape_attrs
643+ self .input = input_html4
644+ self .cgi_escape_attrs = html4_cgi_escape_attrs
669645 # self._context is used for translations.
670646 # will be initialized by the first call to .gettext()
671647 self ._context = None
0 commit comments