I have a textarea that will receive a js snippet(Google Analytics). Is there a way to sanitize that? Since I cannot use functions like wp_filter_nohtml_kse(), what should I use?
3 Answers
No, there is no function for that. You would need a complete JavaScript parser. This is not part of the WordPress core.