[ 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) since: 1.6 return: void |
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. since: 1.6 return: array All tags |
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 since: 1.6 return: array Allowed tags |
yourls_kses_allowed_entities() X-Ref |
Kses global for allowable HTML entities. since: 1.6 return: array Allowed entities |
yourls_kses_allowed_protocols() X-Ref |
Kses global for allowable protocols. since: 1.6 return: array Allowed protocols |
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. since: 1.6 return: string Content with normalized entities param: string $string Content to normalize entities |
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. since: 1.6 return: string Correctly encoded entity param: array $matches preg_replace_callback() matches array |
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. since: 1.6 return: string Correctly encoded entity param: array $matches preg_replace_callback() matches array |
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. since: 1.6 return: string Correctly encoded entity param: array $matches preg_replace_callback() matches array |
_yourls_add_global_attributes( $value ) X-Ref |
Helper function to add global attributes to a tag in the allowed html list. since: 1.6 return: array The array of attributes with global attributes added. param: array $value An array of attributes. |
yourls_valid_unicode($i) X-Ref |
Helper function to determine if a Unicode value is valid. since: 1.6 return: bool True if the value was a valid Unicode number param: int $i Unicode value |
yourls_kses_array_lc($inarray) X-Ref |
Goes through an array and changes the keys to all lower case. since: 1.6 return: array Fixed array with all lowercase keys param: array $inarray Unfiltered array |
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. since: 1.6 return: string Content after decoded entities param: string $string Content to change entities |
_yourls_kses_decode_entities_chr( $match ) X-Ref |
Regex callback for yourls_kses_decode_entities() since: 1.6 return: string param: array $match preg match |
_yourls_kses_decode_entities_chr_hexdec( $match ) X-Ref |
Regex callback for yourls_kses_decode_entities() since: 1.6 return: string param: array $match preg match |
yourls_kses_no_null($string) X-Ref |
Removes any null characters in $string. since: 1.6 return: string param: string $string |
Generated: Thu Jul 3 05:10:26 2025 | Cross-referenced by PHPXref 0.7.1 |