MCPcopy Create free account
hub / github.com/acl-dev/acl / acl_html_encode

Function acl_html_encode

lib_acl/src/code/acl_htmlcode.c:22–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include "html_charset.h"
21
22int acl_html_encode(const char *in, ACL_VSTRING *out)
23{
24 int n = 0;
25 const unsigned char *ptr = (const unsigned char*) in;
26 unsigned int k;
27
28 while (*ptr) {
29 k = (unsigned char) (*ptr);
30 if (k >= 128)
31 ACL_VSTRING_ADDCH(out, k);
32 else if (html_charmap[k] != NULL) {
33 acl_vstring_strcat(out, html_charmap[k]);
34 n++;
35 } else
36 ACL_VSTRING_ADDCH(out, k);
37 ptr++;
38 }
39
40 ACL_VSTRING_TERMINATE(out);
41 return (n);
42}
43
44static ACL_TOKEN *__decode_token_tree = NULL;
45

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 1

acl_vstring_strcatFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…