• Resolved Arne Cordes

    (@arne-cordes)


    Hey, I have the requirement to put some anchors inside labels of profile form fields created by tml_add_form_field. For checkboxes it works, but radio-group options get escaped and therefore the markup is rendered as text.

    Is it necessary to use esc_html for radio-group options? I don’t see a problem with allowing html inside the labels.

    For now I just removed esc_html() in class-theme-my-login-form-field.php (line 587):

    $option .= ‘<label class=”tml-label” for=”‘ . $id . ‘”>’ . $label . “</label>\n”;

    Instead of

    $option .= ‘<label class=”tml-label” for=”‘ . $id . ‘”>’ . esc_html( $label ) . “</label>\n”;

    But hacking plugin code feels bad ??

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘tml_add_form_field: Allow html in radio-group label?’ is closed to new replies.