Question : sanitize_text_field
Answered by : saddam-hussain-cmuiax7rjrvm
Check whether the string is a valid UTF-8 character, and remove all HTML tags.
$str = "<h2>Title</h2>";
sanitize_text_field( $str ); // it will return "title" without any HTML tags!
Source : | Last Update : Fri, 16 Jul 21
Question : sanitize_text_field
Answered by : imran-porda
$str = "<h2>Title</h2>";
sanitize_text_field( $str );
// it will return "title" without any HTML tags!
Source : https://developer.wordpress.org/reference/functions/sanitize_text_field/ | Last Update : Sat, 10 Sep 22