MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / _strip_html

Method _strip_html

IntelOSINT.py:15773–15781  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

15771 return _extract_text_scalar(value)
15772
15773 def _strip_html(raw):
15774 if not isinstance(raw, str):
15775 return ""
15776 t = raw.replace("\r\n", "\n").replace("\r", "\n")
15777 t = re.sub(r"<\s*br\s*/?>", "\n", t, flags=re.IGNORECASE)
15778 t = re.sub(r"<[^>]+>", "", t)
15779 t = re.sub(r"\s+\n", "\n", t)
15780 t = re.sub(r"\n{3,}", "\n\n", t)
15781 return t.strip()
15782
15783 def _as_str(v):
15784 if v is None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected