-
Notifications
You must be signed in to change notification settings - Fork 0
HTML escape the characters '<', '>', '&', and '"'
License
mbucc/chtmlescape
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
-------------------------------------------------------------------- The man page below defines the interface for semantic versioning. A participant in the clibs project. See https://github.com/clibs/clib/wiki/Packages for more info. Sat Dec 13 10:12:49 EST 2014 -------------------------------------------------------------------- HTMLESCAPE(3) BSD Library Functions Manual HTMLESCAPE(3) NAME htmlescape -- HTML escape the characters '<', '>', '&' and '"' SYNOPSIS #include <htmlescape.h> int htmlescape(const char *src, char **dst); DESCRIPTION The htmlescape function parses a string and converts the characters listed above to their corresponding HTML entities. The calling program is responsible for freeing the memory allocated to *dst. RETURN VALUE htmlescape returns 0 on success. If memory could not be allocated for the destination string, then ENOMEM is returned. If either argument is null or the src string is empty, 0 is returned and dst is unchanged. EXAMPLE The following code fragment illustrates a simple usage: char *dst = 0; htmlescape("forbidden: < > & \\\"", &dst); printf("dst = '%s'\n", dst); free(dst); produces this output: dst = 'forbidden: < > & "' BSD December 13, 2014 BSD
About
HTML escape the characters '<', '>', '&', and '"'
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published