Function __global->convert_bad_entities
Definitions
sources/xml.php
- Convert HTML entities to plain characters for XML conformance.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $data | string | No | No | required parameter | N/A | N/A | HTML to convert entities from |
| $charset | string | No | No | ISO-8859-1 | N/A | N/A | The character set we are using for $data (both in and out) |
Returns
- Valid XHTML
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Convert HTML entities to plain characters for XML conformance.
*
* @param string $data HTML to convert entities from
* @param string $charset The character set we are using for $data (both in and out)
* @return string Valid XHTML
*/
function convert_bad_entities(string $data, string $charset = 'ISO-8859-1') : string
* Convert HTML entities to plain characters for XML conformance.
*
* @param string $data HTML to convert entities from
* @param string $charset The character set we are using for $data (both in and out)
* @return string Valid XHTML
*/
function convert_bad_entities(string $data, string $charset = 'ISO-8859-1') : string

