MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / hd_esc

Function hd_esc

src/ui/atlas_handout.c:63–86  ·  view source on GitHub ↗

HTML-escape into the buffer — every graph-derived string passes here. */

Source from the content-addressed store, hash-verified

61
62/* HTML-escape into the buffer — every graph-derived string passes here. */
63static void hd_esc(hd_buf_t *b, const char *s) {
64 if (!s)
65 return;
66 for (const char *c = s; *c; c++) {
67 switch (*c) {
68 case '&':
69 hd_put(b, "&");
70 break;
71 case '<':
72 hd_put(b, "&lt;");
73 break;
74 case '>':
75 hd_put(b, "&gt;");
76 break;
77 case '"':
78 hd_put(b, "&quot;");
79 break;
80 default: {
81 char one[2] = {*c, 0};
82 hd_put(b, one);
83 }
84 }
85 }
86}
87
88static const char *hd_cohesion_word(double cohesion) {
89 if (cohesion >= 0.7)

Callers 1

cbm_atlas_handout_htmlFunction · 0.85

Calls 1

hd_putFunction · 0.85

Tested by

no test coverage detected