cgi_url_validate(3)

cgi_url_validate3

Validate that url is of an allowed format

Usage

#include <cgi/cgi.h>
NEOERR *cgi_url_validate (const char *buf, char **esc);

Arguments

buf - a 0 terminated string

Overview

cgi_url_validate will check that a URL starts with one of the accepted safe schemes. If not, it returns "#" as a safe substitute. Currently accepted schemes are http, https, ftp and mailto. It then html escapes the entire URL so that it is safe to insert in an href attribute.

Return value

esc - a newly allocated string

Releases

Unchanged in 8 releases since Debian 6.0 (Squeeze).

  1. 6.0–13

From clearsilver-dev 0.10.5-6+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.