NO BUG: Strange link behavior for mailto links

Sounds like a bug to me - but…

If I enter the href including a mailto it should open in the mail programm, like here:

<a class="brxe-sgocse brxe-text-basic ansprech__link" href="mailto:example@example.com">example@example.com</a>

Unfortunately the link in the mailprogram is then as the recipient:

mailto:example@example.com

See screenshots, first is the bug, and the other is the same code in a normal html file.

Anyone else has experienced this?

It currently works like this, but this can lead to some unwanted behavior. We have now removed the mailto:{mb_ansprechpartner_email_6bs757cqxl5} from the link.

<a class="brxe-sgocse brxe-text-basic ansprech__link" href="example@example.com">example@example.com</a>

Browser: Chrome 110
OS: macOS
Bricks: 1.9.9
Plugins used: MetaBox (but that does not matter IMO)
URL: Not necessary, see attached screenshots.

This was the setting before we removed the mailto from the email link.

Hi Chris,
Welcome to the forum, and thanks so much for your report!

Ha, the classic: feature or bug?

In this case, it’s a feature. Please have a look at
/wp-content/themes/bricks/includes/integrations/dynamic-data/providers/base.php

Long story short: if you link to an email address, we add the mailto: automatically. If you don’t want this, you can use the :text filter such as {mb_ansprechpartner_email_6bs75cqxl5:text}, but then you have to add the mailto: manually. Alternative: Just leave out the mailto: and it will work as expected.

Best regards,
timmse

1 Like

Thanks a lot, this makes sense.

A bit confusing, as I come from the more classical way of building sites, but once you know it it is indeed handy.

:heart: