Skip to content

Commit 99236f3

Browse files
authored
Fix washing html from rcube_attachment_handler (#9785)
This probably wasn't implemented previously because HTML-parts usually didn't run through get.php.
1 parent b013cd1 commit 99236f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

program/include/rcmail_attachment_handler.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,13 @@ public function html()
309309
// show images?
310310
$is_safe = $this->is_safe();
311311

312-
return rcmail_action_mail_index::wash_html($body, ['safe' => $is_safe, 'inline_html' => false]);
312+
if (isset($this->part->replaces)) {
313+
$wash_replacements = $this->part->replaces;
314+
} else {
315+
$wash_replacements = [];
316+
}
317+
318+
return rcmail_action_mail_index::wash_html($body, ['safe' => $is_safe, 'inline_html' => false], $wash_replacements);
313319
}
314320

315321
/**

0 commit comments

Comments
 (0)