Translate option selector.

Hi guys,

Recently I saw that I didn’t escape the part of my theme with selector for metabox options.
Actually, I am not sure how to escape the content on the best way.

If I’m using wp_kses_post or wp_kses_data all selector with options just dissapears.

Here is my code:

            $html .= '<label for="field">';
            $html .= $label;
            $html .= '</label>';
            $html .= '<div class="field">';
            $html .= '$some_content';
            $html .= '</div>';

            wp_filter_kses ($html);

When I use wp_filter_kses, wp_kses_data or wp_kses_post the selector just disapperes and I’m not sure how to solve this.

Thanks in advance :slight_smile: