/src/php-src/ext/standard/html.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | +----------------------------------------------------------------------+ |
3 | | | Copyright (c) The PHP Group | |
4 | | +----------------------------------------------------------------------+ |
5 | | | This source file is subject to version 3.01 of the PHP license, | |
6 | | | that is bundled with this package in the file LICENSE, and is | |
7 | | | available through the world-wide-web at the following url: | |
8 | | | http://www.php.net/license/3_01.txt | |
9 | | | If you did not receive a copy of the PHP license and are unable to | |
10 | | | obtain it through the world-wide-web, please send a note to | |
11 | | | license@php.net so we can mail you a copy immediately. | |
12 | | +----------------------------------------------------------------------+ |
13 | | | Author: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | |
14 | | +----------------------------------------------------------------------+ |
15 | | */ |
16 | | |
17 | | #ifndef HTML_H |
18 | | #define HTML_H |
19 | | |
20 | | #define ENT_HTML_QUOTE_NONE 0 |
21 | 0 | #define ENT_HTML_QUOTE_SINGLE 1 |
22 | 3.92k | #define ENT_HTML_QUOTE_DOUBLE 2 |
23 | 31 | #define ENT_HTML_IGNORE_ERRORS 4 |
24 | 94 | #define ENT_HTML_SUBSTITUTE_ERRORS 8 |
25 | 7.01k | #define ENT_HTML_DOC_TYPE_MASK (16|32) |
26 | 3.53k | #define ENT_HTML_DOC_HTML401 0 |
27 | 0 | #define ENT_HTML_DOC_XML1 16 |
28 | 234k | #define ENT_HTML_DOC_XHTML 32 |
29 | 0 | #define ENT_HTML_DOC_HTML5 (16|32) |
30 | | /* reserve bit 6 */ |
31 | 18.8k | #define ENT_HTML_SUBSTITUTE_DISALLOWED_CHARS 128 |
32 | | |
33 | | |
34 | 3.89k | #define ENT_COMPAT ENT_HTML_QUOTE_DOUBLE |
35 | 0 | #define ENT_QUOTES (ENT_HTML_QUOTE_DOUBLE | ENT_HTML_QUOTE_SINGLE) |
36 | | #define ENT_NOQUOTES ENT_HTML_QUOTE_NONE |
37 | | #define ENT_IGNORE ENT_HTML_IGNORE_ERRORS |
38 | 0 | #define ENT_SUBSTITUTE ENT_HTML_SUBSTITUTE_ERRORS |
39 | | #define ENT_HTML401 0 |
40 | | #define ENT_XML1 16 |
41 | | #define ENT_XHTML 32 |
42 | | #define ENT_HTML5 (16|32) |
43 | | #define ENT_DISALLOWED 128 |
44 | | |
45 | | void register_html_constants(INIT_FUNC_ARGS); |
46 | | |
47 | | PHPAPI zend_string *php_escape_html_entities(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset); |
48 | | PHPAPI zend_string *php_escape_html_entities_ex(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset, zend_bool double_encode, zend_bool quiet); |
49 | | PHPAPI zend_string *php_unescape_html_entities(zend_string *str, int all, int flags, const char *hint_charset); |
50 | | PHPAPI unsigned int php_next_utf8_char(const unsigned char *str, size_t str_len, size_t *cursor, int *status); |
51 | | |
52 | | #endif /* HTML_H */ |