code: def clean(self, string, n_cols=None):
          
  
          if n_cols is not None and n_cols <= 0:
              return ''
  
          if isinstance(string, six.text_type):
              string = unescape(string)
  
          if self.config['ascii']:
              if isinstance(string, six.binary_type):
                  string = string.decode('utf-8')
              string = string.encode('ascii', 'replace')
              return string[:n_cols] if n_cols else string
          else:
              if n_cols:
                  string = textual_width_chop(string, n_cols)
              if isinstance(string, six.text_type):
                  string = string.encode('utf-8')
              return string
docs: Required reading!
              http://nedbatchelder.com/text/unipain.html
  
          Python 2 input string will be a unicode type (unicode code points).
          Curses will accept unicode if all of the points are in the ascii range.
          However, if any of the code points are not valid ascii curses will
          throw a UnicodeEncodeError: 'ascii' codec can't encode character,
          ordinal not in range(128). If we encode the unicode to a utf-8 byte
          string and pass that to curses, it will render correctly.
  
          Python 3 input string will be a string type (unicode code points).
          Curses will accept that in all cases. However, the n character count in
          addnstr will not be correct. If code points are passed to addnstr,
          curses will treat each code point as one character and will not account
          for wide characters. If utf-8 is passed in, addnstr will treat each
          'byte' as a single character.
  
          Reddit's api sometimes chokes and double-encodes some html characters
          Praw handles the initial decoding, but we need to do a second pass
          just to make sure. See https://github.com/michael-lazar/rtv/issues/96
  
          Example:
              &amp;amp; -> returned directly from reddit's api
              &amp;     -> returned after PRAW decodes the html characters
              &         -> returned after our second pass, this is the true value