Edgewall Software

Changeset 515 for trunk/genshi/input.py


Ignore:
Timestamp:
Mar 20, 2007, 7:27:52 PM (17 years ago)
Author:
cmlenz
Message:

Applied patch for #106 (handling of hex charrefs in HTML parser).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/genshi/input.py

    r514 r515  
    339339
    340340    def handle_charref(self, name):
    341         text = unichr(int(name))
     341        if name.lower().startswith('x'):
     342            text = unichr(int(name[1:], 16))
     343        else:
     344            text = unichr(int(name))
    342345        self._enqueue(TEXT, text)
    343346
Note: See TracChangeset for help on using the changeset viewer.