sanitize_textarea_field
sanitize_textarea_field ( $str )
Parameters:- (string) str String to sanitize.
See:Returns:- (string) Sanitized string.
Defined at: - Introduced in WordPress: 4.7.0
- Deprecated in WordPress: —
Description
Sanitizes a multiline string from user input or from the database.The function is like sanitize_text_field(), but preserves
new lines (\n) and other whitespace, which are legitimate
input in textarea elements.