blob: b75c8417b81682d4f339a3426da9d7afefcb5470 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<div class="api-card">
<h3 class="api-name">cool_sv_write</h3>
<code class="language-c">COOLDEF void cool_sv_write(Cool_StrView sv) </code>
<div class="api-description">
Write string view to output.
</div>
</div>
<div class="api-card">
<h3 class="api-name">cool_html</h3>
<code class="language-c">COOLDEF void cool_html(Cool_StrView sv) </code>
<div class="api-description">
SAFELY write HTML to a buffer. Handles escaping malicious sequences.
</div>
</div>
<div class="api-card">
<h3 class="api-name">cool_html_raw</h3>
<code class="language-c">COOLDEF void cool_html_raw(Cool_StrView sv) </code>
<div class="api-description">
Writes HTML to buffer without escaping sequences. Vulnerable to XSS. Use with caution.
</div>
</div>
<div class="api-card">
<h3 class="api-name">cool_html_raw_cstr</h3>
<code class="language-c">COOLDEF void cool_html_raw_cstr(const char *str, size_t len) </code>
<div class="api-description">
Writes unsafe HTML using C strings.
</div>
</div>
<div class="api-card">
<h3 class="api-name">cool_html_txt</h3>
<code class="language-c">COOLDEF void cool_html_txt(const char *str, size_t len) </code>
<div class="api-description">
Meant for inner text. Escapes '<', '>' and '&'.
</div>
</div>
<div class="api-card">
<h3 class="api-name">cool_htmlf</h3>
<code class="language-c">COOLDEF void cool_htmlf(const char *fmt, ...) </code>
<div class="api-description">
SAFELY write formatted string to buffer.
</div>
</div>
<div class="api-card">
<h3 class="api-name">cool_htmlf_raw</h3>
<code class="language-c">COOLDEF void cool_htmlf_raw(const char *fmt, ...) </code>
<div class="api-description">
Writes formatting HTML string to buffer without escaping sequences. Vulnerable to XSS. Use with caution.
</div>
</div>
|