Edgewall Software

Changeset 386 for trunk/genshi/input.py


Ignore:
Timestamp:
Oct 22, 2006, 6:44:18 PM (17 years ago)
Author:
cmlenz
Message:

Follow-up to [385]: also decode attribute values in the HTMLParser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/genshi/input.py

    r385 r386  
    310310        for name, value in attrib: # Fixup minimized attributes
    311311            if value is None:
    312                 value = name
    313             fixed_attrib.append((name, unicode(stripentities(value))))
     312                value = unicode(name)
     313            elif not isinstance(value, unicode):
     314                value = value.decode(self.encoding, 'replace')
     315            fixed_attrib.append((name, stripentities(value)))
    314316
    315317        self._enqueue(START, (QName(tag), Attrs(fixed_attrib)))
Note: See TracChangeset for help on using the changeset viewer.