php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
html.h File Reference

Go to the source code of this file.

Macros

#define ENT_HTML_QUOTE_NONE   0
 
#define ENT_HTML_QUOTE_SINGLE   1
 
#define ENT_HTML_QUOTE_DOUBLE   2
 
#define ENT_HTML_IGNORE_ERRORS   4
 
#define ENT_HTML_SUBSTITUTE_ERRORS   8
 
#define ENT_HTML_DOC_TYPE_MASK   (16|32)
 
#define ENT_HTML_DOC_HTML401   0
 
#define ENT_HTML_DOC_XML1   16
 
#define ENT_HTML_DOC_XHTML   32
 
#define ENT_HTML_DOC_HTML5   (16|32)
 
#define ENT_HTML_SUBSTITUTE_DISALLOWED_CHARS   128
 
#define PHP_HTML_SPECIALCHARS   0
 
#define PHP_HTML_ENTITIES   1
 
#define ENT_COMPAT   ENT_HTML_QUOTE_DOUBLE
 
#define ENT_QUOTES   (ENT_HTML_QUOTE_DOUBLE | ENT_HTML_QUOTE_SINGLE)
 
#define ENT_NOQUOTES   ENT_HTML_QUOTE_NONE
 
#define ENT_IGNORE   ENT_HTML_IGNORE_ERRORS
 
#define ENT_SUBSTITUTE   ENT_HTML_SUBSTITUTE_ERRORS
 
#define ENT_HTML401   0
 
#define ENT_XML1   16
 
#define ENT_XHTML   32
 
#define ENT_HTML5   (16|32)
 
#define ENT_DISALLOWED   128
 

Functions

PHPAPI zend_stringphp_escape_html_entities (const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset)
 
PHPAPI zend_stringphp_escape_html_entities_ex (const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset, bool double_encode, bool quiet)
 
PHPAPI zend_stringphp_unescape_html_entities (zend_string *str, int all, int flags, const char *hint_charset)
 
PHPAPI unsigned int php_next_utf8_char (const unsigned char *str, size_t str_len, size_t *cursor, zend_result *status)
 

Macro Definition Documentation

◆ ENT_COMPAT

#define ENT_COMPAT   ENT_HTML_QUOTE_DOUBLE

Definition at line 36 of file html.h.

◆ ENT_DISALLOWED

#define ENT_DISALLOWED   128

Definition at line 45 of file html.h.

◆ ENT_HTML401

#define ENT_HTML401   0

Definition at line 41 of file html.h.

◆ ENT_HTML5

#define ENT_HTML5   (16|32)

Definition at line 44 of file html.h.

◆ ENT_HTML_DOC_HTML401

#define ENT_HTML_DOC_HTML401   0

Definition at line 26 of file html.h.

◆ ENT_HTML_DOC_HTML5

#define ENT_HTML_DOC_HTML5   (16|32)

Definition at line 29 of file html.h.

◆ ENT_HTML_DOC_TYPE_MASK

#define ENT_HTML_DOC_TYPE_MASK   (16|32)

Definition at line 25 of file html.h.

◆ ENT_HTML_DOC_XHTML

#define ENT_HTML_DOC_XHTML   32

Definition at line 28 of file html.h.

◆ ENT_HTML_DOC_XML1

#define ENT_HTML_DOC_XML1   16

Definition at line 27 of file html.h.

◆ ENT_HTML_IGNORE_ERRORS

#define ENT_HTML_IGNORE_ERRORS   4

Definition at line 23 of file html.h.

◆ ENT_HTML_QUOTE_DOUBLE

#define ENT_HTML_QUOTE_DOUBLE   2

Definition at line 22 of file html.h.

◆ ENT_HTML_QUOTE_NONE

#define ENT_HTML_QUOTE_NONE   0

Definition at line 20 of file html.h.

◆ ENT_HTML_QUOTE_SINGLE

#define ENT_HTML_QUOTE_SINGLE   1

Definition at line 21 of file html.h.

◆ ENT_HTML_SUBSTITUTE_DISALLOWED_CHARS

#define ENT_HTML_SUBSTITUTE_DISALLOWED_CHARS   128

Definition at line 31 of file html.h.

◆ ENT_HTML_SUBSTITUTE_ERRORS

#define ENT_HTML_SUBSTITUTE_ERRORS   8

Definition at line 24 of file html.h.

◆ ENT_IGNORE

#define ENT_IGNORE   ENT_HTML_IGNORE_ERRORS

Definition at line 39 of file html.h.

◆ ENT_NOQUOTES

#define ENT_NOQUOTES   ENT_HTML_QUOTE_NONE

Definition at line 38 of file html.h.

◆ ENT_QUOTES

Definition at line 37 of file html.h.

◆ ENT_SUBSTITUTE

#define ENT_SUBSTITUTE   ENT_HTML_SUBSTITUTE_ERRORS

Definition at line 40 of file html.h.

◆ ENT_XHTML

#define ENT_XHTML   32

Definition at line 43 of file html.h.

◆ ENT_XML1

#define ENT_XML1   16

Definition at line 42 of file html.h.

◆ PHP_HTML_ENTITIES

#define PHP_HTML_ENTITIES   1

Definition at line 34 of file html.h.

◆ PHP_HTML_SPECIALCHARS

#define PHP_HTML_SPECIALCHARS   0

Definition at line 33 of file html.h.

Function Documentation

◆ php_escape_html_entities()

PHPAPI zend_string * php_escape_html_entities ( const unsigned char * old,
size_t oldlen,
int all,
int flags,
const char * hint_charset )

Definition at line 1012 of file html.c.

◆ php_escape_html_entities_ex()

PHPAPI zend_string * php_escape_html_entities_ex ( const unsigned char * old,
size_t oldlen,
int all,
int flags,
const char * hint_charset,
bool double_encode,
bool quiet )

Definition at line 1099 of file html.c.

◆ php_next_utf8_char()

PHPAPI unsigned int php_next_utf8_char ( const unsigned char * str,
size_t str_len,
size_t * cursor,
zend_result * status )

Definition at line 351 of file html.c.

◆ php_unescape_html_entities()

PHPAPI zend_string * php_unescape_html_entities ( zend_string * str,
int all,
int flags,
const char * hint_charset )

Definition at line 976 of file html.c.