Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

ndh01 on "sanitizing a text field form but keep line breaks"

$
0
0

I have been using sanitize_text_field() to sanitize a text field in a form. I need to keep the line breaks in the form so I can use nl2br to place each line break on a new line when displaying back the data.

Any ideas on how to safely sanitize and yet preserve line breaks?

Thank you


Viewing all articles
Browse latest Browse all 8245

Trending Articles