Documentation

cool_sv_write

COOLDEF void cool_sv_write(Cool_StrView sv)
Write string view to output.

cool_html

COOLDEF void cool_html(Cool_StrView sv)
SAFELY write HTML to a buffer. Handles escaping malicious sequences.

cool_html_raw

COOLDEF void cool_html_raw(Cool_StrView sv)
Writes HTML to buffer without escaping sequences. Vulnerable to XSS. Use with caution.

cool_html_raw_cstr

COOLDEF void cool_html_raw_cstr(const char *str, size_t len)
Writes unsafe HTML using C strings.

cool_html_txt

COOLDEF void cool_html_txt(const char *str, size_t len)
Meant for inner text. Escapes '<', '>' and '&'.

cool_htmlf

COOLDEF void cool_htmlf(const char *fmt, ...)
SAFELY write formatted string to buffer.

cool_htmlf_raw

COOLDEF void cool_htmlf_raw(const char *fmt, ...)
Writes formatting HTML string to buffer without escaping sequences. Vulnerable to XSS. Use with caution.