[ Index ] |
PHP Cross Reference of YOURLS |
[Source view] [Print] [Project Stats]
YOURLS modification of a small subset from WordPress' KSES implementation. Straight from the Let's Not Reinvent The Wheel department.
File Size: | 778 lines (19 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
yourls_kses_init() X-Ref |
Init KSES globals if not already defined (by a plugin) return: void since: 1.6 |
yourls_kses_allowed_tags_all() X-Ref |
Kses global for all allowable HTML tags. Complete (?) list of HTML tags. Keep this function available for any plugin or future feature that will want to display lots of HTML. return: array All tags since: 1.6 |
yourls_kses_allowed_tags() X-Ref |
Kses global for default allowable HTML tags. TODO: trim down to necessary only. Short list of HTML tags used in YOURLS core for display return: array Allowed tags since: 1.6 |
yourls_kses_allowed_entities() X-Ref |
Kses global for allowable HTML entities. return: array Allowed entities since: 1.6 |
yourls_kses_allowed_protocols() X-Ref |
Kses global for allowable protocols. return: array Allowed protocols since: 1.6 |
yourls_kses_normalize_entities($string) X-Ref |
Converts and fixes HTML entities. This function normalizes HTML entities. It will convert "AT&T" to the correct "AT&T", ":" to ":", "&#XYZZY;" to "&#XYZZY;" and so on. param: string $string Content to normalize entities return: string Content with normalized entities since: 1.6 |
yourls_kses_named_entities($matches) X-Ref |
Callback for yourls_kses_normalize_entities() regular expression. This function only accepts valid named entity references, which are finite, case-sensitive, and highly scrutinized by HTML and XML validators. param: array $matches preg_replace_callback() matches array return: string Correctly encoded entity since: 1.6 |
yourls_kses_normalize_entities2($matches) X-Ref |
Callback for yourls_kses_normalize_entities() regular expression. This function helps yourls_kses_normalize_entities() to only accept 16-bit values and nothing more for &#number; entities. param: array $matches preg_replace_callback() matches array return: string Correctly encoded entity since: 1.6 |
yourls_kses_normalize_entities3($matches) X-Ref |
Callback for yourls_kses_normalize_entities() for regular expression. This function helps yourls_kses_normalize_entities() to only accept valid Unicode numeric entities in hex form. param: array $matches preg_replace_callback() matches array return: string Correctly encoded entity since: 1.6 |
_yourls_add_global_attributes( $value ) X-Ref |
Helper function to add global attributes to a tag in the allowed html list. param: array $value An array of attributes. return: array The array of attributes with global attributes added. since: 1.6 |
yourls_valid_unicode($i) X-Ref |
Helper function to determine if a Unicode value is valid. param: int $i Unicode value return: bool True if the value was a valid Unicode number since: 1.6 |
yourls_kses_array_lc($inarray) X-Ref |
Goes through an array and changes the keys to all lower case. param: array $inarray Unfiltered array return: array Fixed array with all lowercase keys since: 1.6 |
yourls_kses_decode_entities($string) X-Ref |
Convert all entities to their character counterparts. This function decodes numeric HTML entities (A and A). It doesn't do anything with other entities like ä, but we don't need them in the URL protocol whitelisting system anyway. param: string $string Content to change entities return: string Content after decoded entities since: 1.6 |
_yourls_kses_decode_entities_chr( $match ) X-Ref |
Regex callback for yourls_kses_decode_entities() param: array $match preg match return: string since: 1.6 |
_yourls_kses_decode_entities_chr_hexdec( $match ) X-Ref |
Regex callback for yourls_kses_decode_entities() param: array $match preg match return: string since: 1.6 |
yourls_kses_no_null($string) X-Ref |
Removes any null characters in $string. param: string $string return: string since: 1.6 |
Generated: Fri Mar 28 05:10:25 2025 | Cross-referenced by PHPXref 0.7.1 |