1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifndef HTML_H
22 #define HTML_H
23
24 #define ENT_HTML_QUOTE_NONE 0
25 #define ENT_HTML_QUOTE_SINGLE 1
26 #define ENT_HTML_QUOTE_DOUBLE 2
27 #define ENT_HTML_IGNORE_ERRORS 4
28 #define ENT_HTML_SUBSTITUTE_ERRORS 8
29 #define ENT_HTML_DOC_TYPE_MASK (16|32)
30 #define ENT_HTML_DOC_HTML401 0
31 #define ENT_HTML_DOC_XML1 16
32 #define ENT_HTML_DOC_XHTML 32
33 #define ENT_HTML_DOC_HTML5 (16|32)
34
35 #define ENT_HTML_SUBSTITUTE_DISALLOWED_CHARS 128
36
37
38 #define ENT_COMPAT ENT_HTML_QUOTE_DOUBLE
39 #define ENT_QUOTES (ENT_HTML_QUOTE_DOUBLE | ENT_HTML_QUOTE_SINGLE)
40 #define ENT_NOQUOTES ENT_HTML_QUOTE_NONE
41 #define ENT_IGNORE ENT_HTML_IGNORE_ERRORS
42 #define ENT_SUBSTITUTE ENT_HTML_SUBSTITUTE_ERRORS
43 #define ENT_HTML401 0
44 #define ENT_XML1 16
45 #define ENT_XHTML 32
46 #define ENT_HTML5 (16|32)
47 #define ENT_DISALLOWED 128
48
49 void register_html_constants(INIT_FUNC_ARGS);
50
51 PHP_FUNCTION(htmlspecialchars);
52 PHP_FUNCTION(htmlentities);
53 PHP_FUNCTION(htmlspecialchars_decode);
54 PHP_FUNCTION(html_entity_decode);
55 PHP_FUNCTION(get_html_translation_table);
56
57 PHPAPI zend_string *php_escape_html_entities(unsigned char *old, size_t oldlen, int all, int flags, char *hint_charset);
58 PHPAPI zend_string *php_escape_html_entities_ex(unsigned char *old, size_t oldlen, int all, int flags, char *hint_charset, zend_bool double_encode);
59 PHPAPI zend_string *php_unescape_html_entities(unsigned char *old, size_t oldlen, int all, int flags, char *hint_charset);
60 PHPAPI unsigned int php_next_utf8_char(const unsigned char *str, size_t str_len, size_t *cursor, int *status);
61
62 #endif