Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu...
File: kses.php
'ntilde',
[500] Fix | Delete
'ograve',
[501] Fix | Delete
'oacute',
[502] Fix | Delete
'ocirc',
[503] Fix | Delete
'otilde',
[504] Fix | Delete
'ouml',
[505] Fix | Delete
'divide',
[506] Fix | Delete
'oslash',
[507] Fix | Delete
'ugrave',
[508] Fix | Delete
'uacute',
[509] Fix | Delete
'ucirc',
[510] Fix | Delete
'uuml',
[511] Fix | Delete
'yacute',
[512] Fix | Delete
'thorn',
[513] Fix | Delete
'yuml',
[514] Fix | Delete
'quot',
[515] Fix | Delete
'amp',
[516] Fix | Delete
'lt',
[517] Fix | Delete
'gt',
[518] Fix | Delete
'apos',
[519] Fix | Delete
'OElig',
[520] Fix | Delete
'oelig',
[521] Fix | Delete
'Scaron',
[522] Fix | Delete
'scaron',
[523] Fix | Delete
'Yuml',
[524] Fix | Delete
'circ',
[525] Fix | Delete
'tilde',
[526] Fix | Delete
'ensp',
[527] Fix | Delete
'emsp',
[528] Fix | Delete
'thinsp',
[529] Fix | Delete
'zwnj',
[530] Fix | Delete
'zwj',
[531] Fix | Delete
'lrm',
[532] Fix | Delete
'rlm',
[533] Fix | Delete
'ndash',
[534] Fix | Delete
'mdash',
[535] Fix | Delete
'lsquo',
[536] Fix | Delete
'rsquo',
[537] Fix | Delete
'sbquo',
[538] Fix | Delete
'ldquo',
[539] Fix | Delete
'rdquo',
[540] Fix | Delete
'bdquo',
[541] Fix | Delete
'dagger',
[542] Fix | Delete
'Dagger',
[543] Fix | Delete
'permil',
[544] Fix | Delete
'lsaquo',
[545] Fix | Delete
'rsaquo',
[546] Fix | Delete
'euro',
[547] Fix | Delete
'fnof',
[548] Fix | Delete
'Alpha',
[549] Fix | Delete
'Beta',
[550] Fix | Delete
'Gamma',
[551] Fix | Delete
'Delta',
[552] Fix | Delete
'Epsilon',
[553] Fix | Delete
'Zeta',
[554] Fix | Delete
'Eta',
[555] Fix | Delete
'Theta',
[556] Fix | Delete
'Iota',
[557] Fix | Delete
'Kappa',
[558] Fix | Delete
'Lambda',
[559] Fix | Delete
'Mu',
[560] Fix | Delete
'Nu',
[561] Fix | Delete
'Xi',
[562] Fix | Delete
'Omicron',
[563] Fix | Delete
'Pi',
[564] Fix | Delete
'Rho',
[565] Fix | Delete
'Sigma',
[566] Fix | Delete
'Tau',
[567] Fix | Delete
'Upsilon',
[568] Fix | Delete
'Phi',
[569] Fix | Delete
'Chi',
[570] Fix | Delete
'Psi',
[571] Fix | Delete
'Omega',
[572] Fix | Delete
'alpha',
[573] Fix | Delete
'beta',
[574] Fix | Delete
'gamma',
[575] Fix | Delete
'delta',
[576] Fix | Delete
'epsilon',
[577] Fix | Delete
'zeta',
[578] Fix | Delete
'eta',
[579] Fix | Delete
'theta',
[580] Fix | Delete
'iota',
[581] Fix | Delete
'kappa',
[582] Fix | Delete
'lambda',
[583] Fix | Delete
'mu',
[584] Fix | Delete
'nu',
[585] Fix | Delete
'xi',
[586] Fix | Delete
'omicron',
[587] Fix | Delete
'pi',
[588] Fix | Delete
'rho',
[589] Fix | Delete
'sigmaf',
[590] Fix | Delete
'sigma',
[591] Fix | Delete
'tau',
[592] Fix | Delete
'upsilon',
[593] Fix | Delete
'phi',
[594] Fix | Delete
'chi',
[595] Fix | Delete
'psi',
[596] Fix | Delete
'omega',
[597] Fix | Delete
'thetasym',
[598] Fix | Delete
'upsih',
[599] Fix | Delete
'piv',
[600] Fix | Delete
'bull',
[601] Fix | Delete
'hellip',
[602] Fix | Delete
'prime',
[603] Fix | Delete
'Prime',
[604] Fix | Delete
'oline',
[605] Fix | Delete
'frasl',
[606] Fix | Delete
'weierp',
[607] Fix | Delete
'image',
[608] Fix | Delete
'real',
[609] Fix | Delete
'trade',
[610] Fix | Delete
'alefsym',
[611] Fix | Delete
'larr',
[612] Fix | Delete
'uarr',
[613] Fix | Delete
'rarr',
[614] Fix | Delete
'darr',
[615] Fix | Delete
'harr',
[616] Fix | Delete
'crarr',
[617] Fix | Delete
'lArr',
[618] Fix | Delete
'uArr',
[619] Fix | Delete
'rArr',
[620] Fix | Delete
'dArr',
[621] Fix | Delete
'hArr',
[622] Fix | Delete
'forall',
[623] Fix | Delete
'part',
[624] Fix | Delete
'exist',
[625] Fix | Delete
'empty',
[626] Fix | Delete
'nabla',
[627] Fix | Delete
'isin',
[628] Fix | Delete
'notin',
[629] Fix | Delete
'ni',
[630] Fix | Delete
'prod',
[631] Fix | Delete
'sum',
[632] Fix | Delete
'minus',
[633] Fix | Delete
'lowast',
[634] Fix | Delete
'radic',
[635] Fix | Delete
'prop',
[636] Fix | Delete
'infin',
[637] Fix | Delete
'ang',
[638] Fix | Delete
'and',
[639] Fix | Delete
'or',
[640] Fix | Delete
'cap',
[641] Fix | Delete
'cup',
[642] Fix | Delete
'int',
[643] Fix | Delete
'sim',
[644] Fix | Delete
'cong',
[645] Fix | Delete
'asymp',
[646] Fix | Delete
'ne',
[647] Fix | Delete
'equiv',
[648] Fix | Delete
'le',
[649] Fix | Delete
'ge',
[650] Fix | Delete
'sub',
[651] Fix | Delete
'sup',
[652] Fix | Delete
'nsub',
[653] Fix | Delete
'sube',
[654] Fix | Delete
'supe',
[655] Fix | Delete
'oplus',
[656] Fix | Delete
'otimes',
[657] Fix | Delete
'perp',
[658] Fix | Delete
'sdot',
[659] Fix | Delete
'lceil',
[660] Fix | Delete
'rceil',
[661] Fix | Delete
'lfloor',
[662] Fix | Delete
'rfloor',
[663] Fix | Delete
'lang',
[664] Fix | Delete
'rang',
[665] Fix | Delete
'loz',
[666] Fix | Delete
'spades',
[667] Fix | Delete
'clubs',
[668] Fix | Delete
'hearts',
[669] Fix | Delete
'diams',
[670] Fix | Delete
'sup1',
[671] Fix | Delete
'sup2',
[672] Fix | Delete
'sup3',
[673] Fix | Delete
'frac14',
[674] Fix | Delete
'frac12',
[675] Fix | Delete
'frac34',
[676] Fix | Delete
'there4',
[677] Fix | Delete
);
[678] Fix | Delete
[679] Fix | Delete
/**
[680] Fix | Delete
* @var string[] $allowedxmlentitynames Array of KSES allowed XML entity names.
[681] Fix | Delete
* @since 5.5.0
[682] Fix | Delete
*/
[683] Fix | Delete
$allowedxmlentitynames = array(
[684] Fix | Delete
'amp',
[685] Fix | Delete
'lt',
[686] Fix | Delete
'gt',
[687] Fix | Delete
'apos',
[688] Fix | Delete
'quot',
[689] Fix | Delete
);
[690] Fix | Delete
[691] Fix | Delete
$allowedposttags = array_map( '_wp_add_global_attributes', $allowedposttags );
[692] Fix | Delete
} else {
[693] Fix | Delete
$required_kses_globals = array(
[694] Fix | Delete
'allowedposttags',
[695] Fix | Delete
'allowedtags',
[696] Fix | Delete
'allowedentitynames',
[697] Fix | Delete
'allowedxmlentitynames',
[698] Fix | Delete
);
[699] Fix | Delete
$missing_kses_globals = array();
[700] Fix | Delete
[701] Fix | Delete
foreach ( $required_kses_globals as $global_name ) {
[702] Fix | Delete
if ( ! isset( $GLOBALS[ $global_name ] ) || ! is_array( $GLOBALS[ $global_name ] ) ) {
[703] Fix | Delete
$missing_kses_globals[] = '<code>$' . $global_name . '</code>';
[704] Fix | Delete
}
[705] Fix | Delete
}
[706] Fix | Delete
[707] Fix | Delete
if ( $missing_kses_globals ) {
[708] Fix | Delete
_doing_it_wrong(
[709] Fix | Delete
'wp_kses_allowed_html',
[710] Fix | Delete
sprintf(
[711] Fix | Delete
/* translators: 1: CUSTOM_TAGS, 2: Global variable names. */
[712] Fix | Delete
__( 'When using the %1$s constant, make sure to set these globals to an array: %2$s.' ),
[713] Fix | Delete
'<code>CUSTOM_TAGS</code>',
[714] Fix | Delete
implode( ', ', $missing_kses_globals )
[715] Fix | Delete
),
[716] Fix | Delete
'6.2.0'
[717] Fix | Delete
);
[718] Fix | Delete
}
[719] Fix | Delete
[720] Fix | Delete
$allowedtags = wp_kses_array_lc( $allowedtags );
[721] Fix | Delete
$allowedposttags = wp_kses_array_lc( $allowedposttags );
[722] Fix | Delete
}
[723] Fix | Delete
[724] Fix | Delete
/**
[725] Fix | Delete
* Filters text content and strips out disallowed HTML.
[726] Fix | Delete
*
[727] Fix | Delete
* This function makes sure that only the allowed HTML element names, attribute
[728] Fix | Delete
* names, attribute values, and HTML entities will occur in the given text string.
[729] Fix | Delete
*
[730] Fix | Delete
* This function expects unslashed data.
[731] Fix | Delete
*
[732] Fix | Delete
* @see wp_kses_post() for specifically filtering post content and fields.
[733] Fix | Delete
* @see wp_allowed_protocols() for the default allowed protocols in link URLs.
[734] Fix | Delete
*
[735] Fix | Delete
* @since 1.0.0
[736] Fix | Delete
*
[737] Fix | Delete
* @param string $content Text content to filter.
[738] Fix | Delete
* @param array[]|string $allowed_html An array of allowed HTML elements and attributes,
[739] Fix | Delete
* or a context name such as 'post'. See wp_kses_allowed_html()
[740] Fix | Delete
* for the list of accepted context names.
[741] Fix | Delete
* @param string[] $allowed_protocols Optional. Array of allowed URL protocols.
[742] Fix | Delete
* Defaults to the result of wp_allowed_protocols().
[743] Fix | Delete
* @return string Filtered content containing only the allowed HTML.
[744] Fix | Delete
*/
[745] Fix | Delete
function wp_kses( $content, $allowed_html, $allowed_protocols = array() ) {
[746] Fix | Delete
if ( empty( $allowed_protocols ) ) {
[747] Fix | Delete
$allowed_protocols = wp_allowed_protocols();
[748] Fix | Delete
}
[749] Fix | Delete
[750] Fix | Delete
$content = wp_kses_no_null( $content, array( 'slash_zero' => 'keep' ) );
[751] Fix | Delete
$content = wp_kses_normalize_entities( $content );
[752] Fix | Delete
$content = wp_kses_hook( $content, $allowed_html, $allowed_protocols );
[753] Fix | Delete
[754] Fix | Delete
return wp_kses_split( $content, $allowed_html, $allowed_protocols );
[755] Fix | Delete
}
[756] Fix | Delete
[757] Fix | Delete
/**
[758] Fix | Delete
* Filters one HTML attribute and ensures its value is allowed.
[759] Fix | Delete
*
[760] Fix | Delete
* This function can escape data in some situations where `wp_kses()` must strip the whole attribute.
[761] Fix | Delete
*
[762] Fix | Delete
* @since 4.2.3
[763] Fix | Delete
*
[764] Fix | Delete
* @param string $attr The 'whole' attribute, including name and value.
[765] Fix | Delete
* @param string $element The HTML element name to which the attribute belongs.
[766] Fix | Delete
* @return string Filtered attribute.
[767] Fix | Delete
*/
[768] Fix | Delete
function wp_kses_one_attr( $attr, $element ) {
[769] Fix | Delete
$uris = wp_kses_uri_attributes();
[770] Fix | Delete
$allowed_html = wp_kses_allowed_html( 'post' );
[771] Fix | Delete
$allowed_protocols = wp_allowed_protocols();
[772] Fix | Delete
$attr = wp_kses_no_null( $attr, array( 'slash_zero' => 'keep' ) );
[773] Fix | Delete
[774] Fix | Delete
// Preserve leading and trailing whitespace.
[775] Fix | Delete
$matches = array();
[776] Fix | Delete
preg_match( '/^\s*/', $attr, $matches );
[777] Fix | Delete
$lead = $matches[0];
[778] Fix | Delete
preg_match( '/\s*$/', $attr, $matches );
[779] Fix | Delete
$trail = $matches[0];
[780] Fix | Delete
if ( empty( $trail ) ) {
[781] Fix | Delete
$attr = substr( $attr, strlen( $lead ) );
[782] Fix | Delete
} else {
[783] Fix | Delete
$attr = substr( $attr, strlen( $lead ), -strlen( $trail ) );
[784] Fix | Delete
}
[785] Fix | Delete
[786] Fix | Delete
// Parse attribute name and value from input.
[787] Fix | Delete
$split = preg_split( '/\s*=\s*/', $attr, 2 );
[788] Fix | Delete
$name = $split[0];
[789] Fix | Delete
if ( count( $split ) === 2 ) {
[790] Fix | Delete
$value = $split[1];
[791] Fix | Delete
[792] Fix | Delete
/*
[793] Fix | Delete
* Remove quotes surrounding $value.
[794] Fix | Delete
* Also guarantee correct quoting in $attr for this one attribute.
[795] Fix | Delete
*/
[796] Fix | Delete
if ( '' === $value ) {
[797] Fix | Delete
$quote = '';
[798] Fix | Delete
} else {
[799] Fix | Delete
$quote = $value[0];
[800] Fix | Delete
}
[801] Fix | Delete
if ( '"' === $quote || "'" === $quote ) {
[802] Fix | Delete
if ( ! str_ends_with( $value, $quote ) ) {
[803] Fix | Delete
return '';
[804] Fix | Delete
}
[805] Fix | Delete
$value = substr( $value, 1, -1 );
[806] Fix | Delete
} else {
[807] Fix | Delete
$quote = '"';
[808] Fix | Delete
}
[809] Fix | Delete
[810] Fix | Delete
// Sanitize quotes, angle braces, and entities.
[811] Fix | Delete
$value = esc_attr( $value );
[812] Fix | Delete
[813] Fix | Delete
// Sanitize URI values.
[814] Fix | Delete
if ( in_array( strtolower( $name ), $uris, true ) ) {
[815] Fix | Delete
$value = wp_kses_bad_protocol( $value, $allowed_protocols );
[816] Fix | Delete
}
[817] Fix | Delete
[818] Fix | Delete
$attr = "$name=$quote$value$quote";
[819] Fix | Delete
$vless = 'n';
[820] Fix | Delete
} else {
[821] Fix | Delete
$value = '';
[822] Fix | Delete
$vless = 'y';
[823] Fix | Delete
}
[824] Fix | Delete
[825] Fix | Delete
// Sanitize attribute by name.
[826] Fix | Delete
wp_kses_attr_check( $name, $value, $attr, $vless, $element, $allowed_html );
[827] Fix | Delete
[828] Fix | Delete
// Restore whitespace.
[829] Fix | Delete
return $lead . $attr . $trail;
[830] Fix | Delete
}
[831] Fix | Delete
[832] Fix | Delete
/**
[833] Fix | Delete
* Returns an array of allowed HTML tags and attributes for a given context.
[834] Fix | Delete
*
[835] Fix | Delete
* @since 3.5.0
[836] Fix | Delete
* @since 5.0.1 `form` removed as allowable HTML tag.
[837] Fix | Delete
*
[838] Fix | Delete
* @global array $allowedposttags
[839] Fix | Delete
* @global array $allowedtags
[840] Fix | Delete
* @global array $allowedentitynames
[841] Fix | Delete
*
[842] Fix | Delete
* @param string|array $context The context for which to retrieve tags. Allowed values are 'post',
[843] Fix | Delete
* 'strip', 'data', 'entities', or the name of a field filter such as
[844] Fix | Delete
* 'pre_user_description', or an array of allowed HTML elements and attributes.
[845] Fix | Delete
* @return array Array of allowed HTML tags and their allowed attributes.
[846] Fix | Delete
*/
[847] Fix | Delete
function wp_kses_allowed_html( $context = '' ) {
[848] Fix | Delete
global $allowedposttags, $allowedtags, $allowedentitynames;
[849] Fix | Delete
[850] Fix | Delete
if ( is_array( $context ) ) {
[851] Fix | Delete
// When `$context` is an array it's actually an array of allowed HTML elements and attributes.
[852] Fix | Delete
$html = $context;
[853] Fix | Delete
$context = 'explicit';
[854] Fix | Delete
[855] Fix | Delete
/**
[856] Fix | Delete
* Filters the HTML tags that are allowed for a given context.
[857] Fix | Delete
*
[858] Fix | Delete
* HTML tags and attribute names are case-insensitive in HTML but must be
[859] Fix | Delete
* added to the KSES allow list in lowercase. An item added to the allow list
[860] Fix | Delete
* in upper or mixed case will not recognized as permitted by KSES.
[861] Fix | Delete
*
[862] Fix | Delete
* @since 3.5.0
[863] Fix | Delete
*
[864] Fix | Delete
* @param array[] $html Allowed HTML tags.
[865] Fix | Delete
* @param string $context Context name.
[866] Fix | Delete
*/
[867] Fix | Delete
return apply_filters( 'wp_kses_allowed_html', $html, $context );
[868] Fix | Delete
}
[869] Fix | Delete
[870] Fix | Delete
switch ( $context ) {
[871] Fix | Delete
case 'post':
[872] Fix | Delete
/** This filter is documented in wp-includes/kses.php */
[873] Fix | Delete
$tags = apply_filters( 'wp_kses_allowed_html', $allowedposttags, $context );
[874] Fix | Delete
[875] Fix | Delete
// 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
[876] Fix | Delete
if ( ! CUSTOM_TAGS && ! isset( $tags['form'] ) && ( isset( $tags['input'] ) || isset( $tags['select'] ) ) ) {
[877] Fix | Delete
$tags = $allowedposttags;
[878] Fix | Delete
[879] Fix | Delete
$tags['form'] = array(
[880] Fix | Delete
'action' => true,
[881] Fix | Delete
'accept' => true,
[882] Fix | Delete
'accept-charset' => true,
[883] Fix | Delete
'enctype' => true,
[884] Fix | Delete
'method' => true,
[885] Fix | Delete
'name' => true,
[886] Fix | Delete
'target' => true,
[887] Fix | Delete
);
[888] Fix | Delete
[889] Fix | Delete
/** This filter is documented in wp-includes/kses.php */
[890] Fix | Delete
$tags = apply_filters( 'wp_kses_allowed_html', $tags, $context );
[891] Fix | Delete
}
[892] Fix | Delete
[893] Fix | Delete
return $tags;
[894] Fix | Delete
[895] Fix | Delete
case 'user_description':
[896] Fix | Delete
case 'pre_user_description':
[897] Fix | Delete
$tags = $allowedtags;
[898] Fix | Delete
$tags['a']['rel'] = true;
[899] Fix | Delete
/** This filter is documented in wp-includes/kses.php */
[900] Fix | Delete
return apply_filters( 'wp_kses_allowed_html', $tags, $context );
[901] Fix | Delete
[902] Fix | Delete
case 'strip':
[903] Fix | Delete
/** This filter is documented in wp-includes/kses.php */
[904] Fix | Delete
return apply_filters( 'wp_kses_allowed_html', array(), $context );
[905] Fix | Delete
[906] Fix | Delete
case 'entities':
[907] Fix | Delete
/** This filter is documented in wp-includes/kses.php */
[908] Fix | Delete
return apply_filters( 'wp_kses_allowed_html', $allowedentitynames, $context );
[909] Fix | Delete
[910] Fix | Delete
case 'data':
[911] Fix | Delete
default:
[912] Fix | Delete
/** This filter is documented in wp-includes/kses.php */
[913] Fix | Delete
return apply_filters( 'wp_kses_allowed_html', $allowedtags, $context );
[914] Fix | Delete
}
[915] Fix | Delete
}
[916] Fix | Delete
[917] Fix | Delete
/**
[918] Fix | Delete
* You add any KSES hooks here.
[919] Fix | Delete
*
[920] Fix | Delete
* There is currently only one KSES WordPress hook, {@see 'pre_kses'}, and it is called here.
[921] Fix | Delete
* All parameters are passed to the hooks and expected to receive a string.
[922] Fix | Delete
*
[923] Fix | Delete
* @since 1.0.0
[924] Fix | Delete
*
[925] Fix | Delete
* @param string $content Content to filter through KSES.
[926] Fix | Delete
* @param array[]|string $allowed_html An array of allowed HTML elements and attributes,
[927] Fix | Delete
* or a context name such as 'post'. See wp_kses_allowed_html()
[928] Fix | Delete
* for the list of accepted context names.
[929] Fix | Delete
* @param string[] $allowed_protocols Array of allowed URL protocols.
[930] Fix | Delete
* @return string Filtered content through {@see 'pre_kses'} hook.
[931] Fix | Delete
*/
[932] Fix | Delete
function wp_kses_hook( $content, $allowed_html, $allowed_protocols ) {
[933] Fix | Delete
/**
[934] Fix | Delete
* Filters content to be run through KSES.
[935] Fix | Delete
*
[936] Fix | Delete
* @since 2.3.0
[937] Fix | Delete
*
[938] Fix | Delete
* @param string $content Content to filter through KSES.
[939] Fix | Delete
* @param array[]|string $allowed_html An array of allowed HTML elements and attributes,
[940] Fix | Delete
* or a context name such as 'post'. See wp_kses_allowed_html()
[941] Fix | Delete
* for the list of accepted context names.
[942] Fix | Delete
* @param string[] $allowed_protocols Array of allowed URL protocols.
[943] Fix | Delete
*/
[944] Fix | Delete
return apply_filters( 'pre_kses', $content, $allowed_html, $allowed_protocols );
[945] Fix | Delete
}
[946] Fix | Delete
[947] Fix | Delete
/**
[948] Fix | Delete
* Returns the version number of KSES.
[949] Fix | Delete
*
[950] Fix | Delete
* @since 1.0.0
[951] Fix | Delete
*
[952] Fix | Delete
* @return string KSES version number.
[953] Fix | Delete
*/
[954] Fix | Delete
function wp_kses_version() {
[955] Fix | Delete
return '0.2.2';
[956] Fix | Delete
}
[957] Fix | Delete
[958] Fix | Delete
/**
[959] Fix | Delete
* Searches for HTML tags, no matter how malformed.
[960] Fix | Delete
*
[961] Fix | Delete
* It also matches stray `>` characters.
[962] Fix | Delete
*
[963] Fix | Delete
* @since 1.0.0
[964] Fix | Delete
* @since 6.6.0 Recognize additional forms of invalid HTML which convert into comments.
[965] Fix | Delete
*
[966] Fix | Delete
* @global array[]|string $pass_allowed_html An array of allowed HTML elements and attributes,
[967] Fix | Delete
* or a context name such as 'post'.
[968] Fix | Delete
* @global string[] $pass_allowed_protocols Array of allowed URL protocols.
[969] Fix | Delete
*
[970] Fix | Delete
* @param string $content Content to filter.
[971] Fix | Delete
* @param array[]|string $allowed_html An array of allowed HTML elements and attributes,
[972] Fix | Delete
* or a context name such as 'post'. See wp_kses_allowed_html()
[973] Fix | Delete
* for the list of accepted context names.
[974] Fix | Delete
* @param string[] $allowed_protocols Array of allowed URL protocols.
[975] Fix | Delete
* @return string Content with fixed HTML tags
[976] Fix | Delete
*/
[977] Fix | Delete
function wp_kses_split( $content, $allowed_html, $allowed_protocols ) {
[978] Fix | Delete
global $pass_allowed_html, $pass_allowed_protocols;
[979] Fix | Delete
[980] Fix | Delete
$pass_allowed_html = $allowed_html;
[981] Fix | Delete
$pass_allowed_protocols = $allowed_protocols;
[982] Fix | Delete
[983] Fix | Delete
$token_pattern = <<<REGEX
[984] Fix | Delete
~
[985] Fix | Delete
( # Detect comments of various flavors before attempting to find tags.
[986] Fix | Delete
(<!--.*?(-->|$)) # - Normative HTML comments.
[987] Fix | Delete
|
[988] Fix | Delete
</[^a-zA-Z][^>]*> # - Closing tags with invalid tag names.
[989] Fix | Delete
|
[990] Fix | Delete
<![^>]*> # - Invalid markup declaration nodes. Not all invalid nodes
[991] Fix | Delete
# are matched so as to avoid breaking legacy behaviors.
[992] Fix | Delete
)
[993] Fix | Delete
|
[994] Fix | Delete
(<[^>]*(>|$)|>) # Tag-like spans of text.
[995] Fix | Delete
~x
[996] Fix | Delete
REGEX;
[997] Fix | Delete
return preg_replace_callback( $token_pattern, '_wp_kses_split_callback', $content );
[998] Fix | Delete
}
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function