(self, data)
| 98 | self.sanitised += "&" + name + ";" |
| 99 | |
| 100 | def feed(self, data): |
| 101 | try: |
| 102 | data = unicode(data, 'utf-8') |
| 103 | except UnicodeDecodeError: |
| 104 | data = unicode(data, 'utf-8', errors='replace') |
| 105 | HTMLParser.feed(self, data) |
| 106 | tmp = SafeHTMLParser.replace_pre(data) |
| 107 | tmp = SafeHTMLParser.uriregex1.sub( |
| 108 | r'<a href="\1">\1</a>', |
| 109 | tmp) |
| 110 | tmp = SafeHTMLParser.uriregex2.sub(r'<a href="\1&', tmp) |
| 111 | tmp = SafeHTMLParser.emailregex.sub(r'<a href="mailto:\1">\1</a>', tmp) |
| 112 | tmp = SafeHTMLParser.replace_post(tmp) |
| 113 | self.raw += tmp |
| 114 | |
| 115 | def is_html(self, text = None, allow_picture = False): |
| 116 | if text: |
no test coverage detected