Skip to content

v1.5.47 — Fix sender dropdown saving & duplicate senders

Latest

Choose a tag to compare

@dompl dompl released this 09 Mar 17:06

What's Fixed

Sender not saving

The custom select dropdown was building option buttons via string concatenation (data-value="{...}"), which broke the HTML when values contained JSON (the double quotes inside the JSON conflicted with the attribute delimiters). Now uses jQuery .attr() for safe attribute escaping.

Sender selection lost on form save

jQuery's .data('value') auto-parses JSON strings into JavaScript objects. When the click handler then called .val(object), it silently failed to match any <option> in the native select. The hidden input stayed empty, so sanitize_brevo_sender() returned ''. Now reads values with .attr('data-value') to preserve the raw string.

Duplicate senders

The Brevo API can return the same sender from both transactional and marketing contexts. Senders are now deduplicated by email address before display.