Adding a mailto as valid url

Recently I’ve gotten a wordpress plugin which adds a few linked buttons and I’m trying to add “contact us” with a mailto link as one of them but keep getting an error saying “url must be valid”.

Is there a way to create a mailto url which is qualifies as valid?

Read More

Thanks

Related posts

1 comment

  1. The standard mailto link looks like this:

    <a href=“mailto:name@domain.com”>Mail me</a>
    

    However, your plugin might be using “sanitize_url()” function to see if you’re entering a proper url (with http:// or https://).

    So if that’s the case then you need to modify the plugin and make it sanitize_text_field or any other that fits best as per your needs. You might need to make changes to plugin at other places too along with it.

Comments are closed.