| Conditions | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # coding: utf-8 |
||
| 11 | def html_entity_decode_char(self, m, defs=htmlentities.entitydefs): |
||
| 12 | """ |
||
| 13 | decode html entity into one of the html char |
||
| 14 | """ |
||
| 15 | try: |
||
| 16 | char = defs[m.group(1)] |
||
| 17 | return "&{char};".format(char=char) |
||
| 18 | except ValueError: |
||
| 19 | return m.group(0) |
||
| 20 | except KeyError: |
||
| 21 | return m.group(0) |
||
| 22 | |||
| 45 |