Skip to main content

htmlEncodeEntities

Function htmlEncodeEntities 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn htmlEncodeEntities( out: *mut u8, outlen: *mut c_int, input: *const u8, inlen: *mut c_int, quoteChar: c_int, ) -> c_int
Expand description

Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out. Ported from archaeology/libxml2-git/HTMLparser.c htmlEncodeEntities.

Returns 0 if success, -2 if the transcoding fails, or -1 otherwise. inlen after return is the number of octets consumed; outlen the number of octets produced.

§UPSTREAM-PARITY

int htmlEncodeEntities(unsigned char *out, int *outlen,
                       const unsigned char *in, int *inlen, int quoteChar);