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

Method parse_comment

pattern/web/feed/feedparser.py:2846–2856  ·  view source on GitHub ↗
(self, i, report=1)

Source from the content-addressed store, hash-verified

2844 return ' '.join(clean)
2845
2846 def parse_comment(self, i, report=1):
2847 ret = _BaseHTMLProcessor.parse_comment(self, i, report)
2848 if ret >= 0:
2849 return ret
2850 # if ret == -1, this may be a malicious attempt to circumvent
2851 # sanitization, or a page-destroying unclosed comment
2852 match = re.compile(r'--[^>]*>').search(self.rawdata, i+4)
2853 if match:
2854 return match.end()
2855 # unclosed comment; deliberately fail to handle_data()
2856 return len(self.rawdata)
2857
2858
2859def _sanitizeHTML(htmlSource, encoding, _type):

Callers

nothing calls this directly

Calls 2

lenFunction · 0.85
searchMethod · 0.45

Tested by

no test coverage detected