Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_kses_decode_entities [ WordPress Function ]

wp_kses_decode_entities ( $string )
Parameters:
  • (string) $string Content to change entities
Returns:
  • (string) Content after decoded entities
Defined at:



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.

Source


<?php
function wp_kses_decode_entities($string) {
    
$string preg_replace_callback('/&#([0-9]+);/''_wp_kses_decode_entities_chr'$string);
    
$string preg_replace_callback('/&#[Xx]([0-9A-Fa-f]+);/''_wp_kses_decode_entities_chr_hexdec'$string);

    return 
$string;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics