MCPcopy
hub / github.com/nonebot/nonebot2 / escape_text

Function escape_text

tests/utils.py:9–13  ·  view source on GitHub ↗
(s: str, *, escape_comma: bool = True)

Source from the content-addressed store, hash-verified

7
8
9def escape_text(s: str, *, escape_comma: bool = True) -> str:
10 s = s.replace("&", "&").replace("[", "[").replace("]", "]")
11 if escape_comma:
12 s = s.replace(",", ",")
13 return s
14
15
16class FakeAdapter(Adapter):

Callers 3

test_message_injectionFunction · 0.90
__add__Method · 0.85

Calls

no outgoing calls

Tested by 2

test_message_injectionFunction · 0.72