MCPcopy
hub / github.com/Textualize/rich / escape_text

Method escape_text

rich/console.py:2446–2448  ·  view source on GitHub ↗

HTML escape text and replace spaces with nbsp.

(text: str)

Source from the content-addressed store, hash-verified

2444 style_no = 1
2445
2446 def escape_text(text: str) -> str:
2447 """HTML escape text and replace spaces with nbsp."""
2448 return escape(text).replace(" ", " ")
2449
2450 def make_tag(
2451 name: str, content: Optional[str] = None, **attribs: object

Callers

nothing calls this directly

Calls 2

replaceMethod · 0.80
escapeFunction · 0.70

Tested by

no test coverage detected