HTML Data Validation For Envato

I have scanned my theme by Envato theme check plugin to solve any mistake in my theme, I have found that the all data that print to the user must be escaped so I have done that and everything great for all escape functions like esc_attr, esc_url, esc_js and so only…

The problem is with esc_html, I have many functions print an HTML content so if I used esc_html the HTML content will be broken and if I use wp_kses I think I shouldn’t use it because this is my own markup and I am sure it’s validated and sometimes the HTML tags have custom attributes so it’s very difficult to use wp_kses.

My question is what’s the best solution for this case?

Read more here:: HTML Data Validation For Envato

Leave a Reply

Your email address will not be published. Required fields are marked *