(self, data)
| 1918 | return j |
| 1919 | |
| 1920 | def feed(self, data): |
| 1921 | data = re.compile(r'<!((?!DOCTYPE|--|\[))', re.IGNORECASE).sub(r'<!\1', data) |
| 1922 | data = re.sub(r'<([^<>\s]+?)\s*/>', self._shorttag_replace, data) |
| 1923 | data = data.replace(''', "'") |
| 1924 | data = data.replace('"', '"') |
| 1925 | try: |
| 1926 | bytes |
| 1927 | if bytes is str: |
| 1928 | raise NameError |
| 1929 | self.encoding = self.encoding + u'_INVALID_PYTHON_3' |
| 1930 | except NameError: |
| 1931 | if self.encoding and isinstance(data, unicode): |
| 1932 | data = data.encode(self.encoding) |
| 1933 | sgmllib.SGMLParser.feed(self, data) |
| 1934 | sgmllib.SGMLParser.close(self) |
| 1935 | |
| 1936 | def normalize_attrs(self, attrs): |
| 1937 | if not attrs: |
no test coverage detected