sanitize text field

Solutions on MaxInterview for sanitize text field by the best coders in the world

showing results for - "sanitize text field"
María Camila
23 May 2018
1Check whether the string is a valid UTF-8 character, and remove all HTML tags.
2
3
4$str = "<h2>Title</h2>";
5sanitize_text_field( $str ); // it will return "title" without any HTML tags!