| Conditions | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # coding: utf-8 |
||
| 23 | def html_entity_decode_codepoint(self, m, |
||
| 24 | defs=htmlentities.codepoint2name): |
||
| 25 | """ |
||
| 26 | decode html entity into one of the codepoint2name |
||
| 27 | """ |
||
| 28 | try: |
||
| 29 | char = defs[m.group(1)] |
||
| 30 | return "&{char};".format(char=char) |
||
| 31 | except ValueError: |
||
| 32 | return m.group(0) |
||
| 33 | except KeyError: |
||
| 34 | return m.group(0) |
||
| 35 | |||
| 45 |