MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _strip_html

Function _strip_html

agents/coldstart-agent/main.py:588–594  ·  view source on GitHub ↗

Convert a small HTML fragment into plain text.

(value: str)

Source from the content-addressed store, hash-verified

586 """Reject URLs that point at the local host or a private network.
587
588 --homepage-url and --scholar-url are fetched server-side, so without this a
589 URL like http://127.0.0.1:8765/api/settings or a cloud metadata endpoint
590 (169.254.169.254) would be requested by PaperFlow and its response folded
591 into the profile. Only http/https are allowed, and the hostname is resolved
592 first because a public name can still map to a private address.
593
594 Set PAPERFLOW_ALLOW_PRIVATE_FETCH=1 if you host your homepage on the local
595 network and understand the implication.
596 """
597 if str(os.environ.get("PAPERFLOW_ALLOW_PRIVATE_FETCH", "")).strip().lower() in {"1", "true", "yes", "on"}:

Calls 1

_collapse_whitespaceFunction · 0.85

Tested by

no test coverage detected