Since WordPress 4.7 there is sanitize_textarea_field()
.
Which does exactly as you want, from the Codex.
Sanitizes a multiline string from user input or from the database.
Since WordPress 4.7 there is sanitize_textarea_field()
.
Which does exactly as you want, from the Codex.
Sanitizes a multiline string from user input or from the database.