I know how to sanitize metabox content like
<img src=x onerror=console.log(hey) />
But how about the following?
<img src=x onerror=console.log(hey)<img src="x" />
Tried the code below, but doesn't seem to work.
wp_kses_post()
Tried using balanceTags(), striplashes(), wp_kses_post(), etc.
sanitize_text_field() would work obviously but it'd filter out all the HTML.
if storing to the database you should use sanitze functions. if your outputting to the browser you should use escape functions.
using
wp_ksesor