Returns a string containing the decoded value of a given HTML attribute.
Description
Text found inside an HTML attribute has different parsing rules than for text found inside other markup, or DATA segments. Use this function to read the decoded value of an HTML string inside a quoted attribute. Example: '“😄”' === WP_HTML_Decode::decode_attribute( '“😄&#x94' );
Parameters
$textstring
Text containing raw and non-decoded attribute value to decode.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 6.9.7 tag, from src/wp-includes/html-api/class-wp-html-decoder.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.