MCPcopy Index your code
hub / github.com/python/cpython / magic_html_parser

Function magic_html_parser

Doc/includes/email-read-alternative.py:12–18  ·  view source on GitHub ↗

Return safety-sanitized html linked to partfiles. Rewrite the href="cid:...." attributes to point to the filenames in partfiles. Though not trivial, this should be possible using html.parser.

(html_text, partfiles)

Source from the content-addressed store, hash-verified

10
11
12def magic_html_parser(html_text, partfiles):
13 """Return safety-sanitized html linked to partfiles.
14
15 Rewrite the href="cid:...." attributes to point to the filenames in partfiles.
16 Though not trivial, this should be possible using html.parser.
17 """
18 raise NotImplementedError("Add the magic needed")
19
20
21# In a real program you'd get the filename from the arguments.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…