Variables and options must be escaped when echo’d
-
hi,i am learning wordpress plugin development and i tried to upload a plugin that i made to wordpress plugin directory.i get a mail from wordpress plugin review team that contains lots of fix for my plugin.inluding “Variables and options must be escaped when echo’d”
i don’t understand what is the message for i have fixed this with two different way . can anyone help me to choose the correct fix.
<div class="'.esc_attr( "kmf-cpr-field ip" ).'"> <p>'.esc_html("Is Public").'</p> <input type="'.esc_attr( "checkbox" ).'" id="'.esc_attr( "ip" ).'" name="'.esc_attr($this->meta_slug_og.'[ip]').'" '.esc_attr($this->get_the_saved_value(get_the_ID(),$this->meta_slug_og,'select','ip')).'></div>
and another one is<input type="checkbox" id="editor" name="'.esc_attr($this->meta_slug_og.'[supports][]').'" value="editor" '.esc_attr($this->get_the_saved_value(get_the_ID(),$this->meta_slug_og,'multi_select','supports','editor')).'> <label for="editor">'.esc_html('Editor').'</label>
it will be kind if anyone can help me with this.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Variables and options must be escaped when echo’d’ is closed to new replies.