Mailto URL displayed incorrectly in header
-
In the WordPress dashboard, I go to Appearance -> Customize. There is the section “Social Media Icons”, with the field labeled “Enter your Mailto url”. If I enter an email address here, then the email link is displayed in the header with “https://” prefix on the link. If I try to enter the email with “mailto:” prefix myself, the email link is not displayed. Problem is that the email is displayed by header.php with
echo esc_url($email)
but this should be something like
echo esc_url('mailto:' . $email)
and so you can keep validation using
is_email($email)
.
- The topic ‘Mailto URL displayed incorrectly in header’ is closed to new replies.