Plugin Directory

Changeset 2593016


Ignore:
Timestamp:
09/03/2021 02:37:28 AM (4 years ago)
Author:
zhengdon
Message:

sanitize the content

File:
1 edited

Legend:

Unmodified
Added
Removed
  • keydatas/trunk/keydatas.php

    r2592506 r2593016  
    7373                $title=htmlspecialchars_decode($title);
    7474            }           
    75             //which funtion to sanitize the html content?
    76             $content =keydatas_sanitize_html($_POST["post_content"]);
     75           
     76            $content =wp_kses_post($_POST["post_content"]);
    7777            if (empty($content)) {
    7878                $content='';
     
    400400}
    401401
    402 function keydatas_sanitize_html($html) {
    403     //which funtion to sanitize the html content?
    404     //$html=sanitize_text_field($html);
    405     return $html;
    406 }
    407402
    408403?>
Note: See TracChangeset for help on using the changeset viewer.