<s> from warnings import warn <EOL> from django . template import defaultfilters as filters <EOL> from avocado . formatters import Formatter , process_multiple <EOL> warn ( '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> class HTMLFormatter ( Formatter ) : <EOL> delimiter = u'<STR_LIT:U+0020>' <EOL> html_map = { <EOL> None : '<STR_LIT>' <EOL> } <EOL> @ process_multiple <EOL> def to_html ( self , values , fields , context ) : <EOL> toks = [ ] <EOL> for value in values : <EOL> if value in self . html_map : <EOL> tok = self . html_map [ value ] <EOL> elif value is None : <EOL> continue <EOL> elif type ( value ) is float : <EOL> tok = filters . floatformat ( value ) <EOL> else : <EOL> tok = unicode ( value ) <EOL> toks . append ( tok ) <EOL> return self . delimiter . join ( toks ) </s>
