Home Forums Newsletter Plugin Support Submit Button Not Showing Font Awesome Envelope Icon

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #76365
    thomastthai
    Participant

    Instead of showing the envelope icon for the submit button, the unicode text “&#xf0e0” is shown instead. The cause is in the Newsletter Plugin’s subscription.php file at line 1478. The unicode “&#xf0e0” is passed through the esc_attr() function which resulted in “&#xf0e0” being used in the HTML. Removing the esc_attr() from that line got the envelop to display.

    A screencast video detailing the bug is posted on YouTube.

       1475         if (strpos($options_profile['subscribe'], 'http://') !== false) {
       1476             $buffer .= '<input class="tnp-submit-image" type="image" src="' . esc_attr($options_profile['subscribe']) . '">' . "\n";
       1477         } else {
       1478         // TTT: esc_attr() changes & sign to & when used with Font Awesome values
       1479         //      like &#xf0e0 into "&#xf0e0" and cause the icon not to show up
       1480             //$buffer .= '<input class="tnp-submit" type="submit" value="' . esc_attr($options_profile['subscribe']) . '">' . "\n";
       1481             $buffer .= '<input class="tnp-submit" type="submit" value="' . $options_profile['subscribe'] . '">' . "\n";
       1482         }
    #78992
    Stefano
    Keymaster

    Thank you, will check that. The escape is there for a good reason: basic users which are not aware of HTML entity encoding can break the button adding unescaped characters.

    Bye, Stefano.

    #241715
    thomastthai
    Participant

    Each time I update Newsletter, I have to go back and make this modification. Is there a way to handle this properly?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.