wp_kses_named_entities

Advertisement

Summery Summery

Callback for wp_kses_normalize_entities() regular expression.

Syntax Syntax

wp_kses_named_entities( array $matches )

Description Description

This function only accepts valid named entity references, which are finite, case-sensitive, and highly scrutinized by HTML and XML validators.

Parameters Parameters

$matches

(Required) preg_replace_callback() matches array.

Return Return

(string) Correctly encoded entity.

Source Source

File: wp-includes/kses.php

 * 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.
 *
 * When `$context` is set to 'xml', HTML entities are converted to their code points.  For
 * example, `AT&T…&#XYZZY;` is converted to `AT&T…&#XYZZY;`.
 *
 * @since 1.0.0
 * @since 5.5.0 Added `$context` parameter.

Advertisement

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Advertisement

Leave a Reply