Fix using display_message() with a localization label from inside an iframe

We have to localize the label before we redirect execution to parent window.
pull/6185/head
Aleksander Machniak 7 years ago
parent a1be62b19d
commit c9555506b3

@ -7840,6 +7840,9 @@ function rcube_webmail()
// display a system message, list of types in common.css (below #message definition)
this.display_message = function(msg, type, timeout, key)
{
if (msg && msg.length && /^[a-z.]+$/.test(msg))
msg = this.get_label(msg);
// pass command to parent window
if (this.is_framed())
return parent.rcmail.display_message(msg, type, timeout);
@ -7854,9 +7857,6 @@ function rcube_webmail()
if (!type)
type = 'notice';
if (msg && msg.length && /^[a-z.]+$/.test(msg))
msg = this.get_label(msg);
if (!key)
key = this.html_identifier(msg);

Loading…
Cancel
Save