MCPcopy Index your code
hub / github.com/clips/pattern / feed

Method feed

pattern/web/feed/feedparser.py:1920–1934  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

1918 return j
1919
1920 def feed(self, data):
1921 data = re.compile(r'<!((?!DOCTYPE|--|\[))', re.IGNORECASE).sub(r'&lt;!\1', data)
1922 data = re.sub(r'<([^<>\s]+?)\s*/>', self._shorttag_replace, data)
1923 data = data.replace('&#39;', "'")
1924 data = data.replace('&#34;', '"')
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:

Callers 3

_resolveRelativeURIsFunction · 0.45
_sanitizeHTMLFunction · 0.45
parseFunction · 0.45

Calls 2

encodeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected