Index: branches/RC/core/units/email_events/email_events_event_handler.php =================================================================== diff -u -r10606 -r10632 --- branches/RC/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 10606) +++ branches/RC/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 10632) @@ -273,10 +273,24 @@ // 1. parse template $this->Application->InitParser(); $parser_params = $this->Application->Parser->Params; // backup parser params + + // ==== for TemplateParser class only: begin ==== + $parser_pattern = $this->Application->Parser->Pattern; + $parser_values = $this->Application->Parser->Values; + $this->Application->Parser->Pattern = Array(); // fixes bug in TemplateParser::SortParams + $this->Application->Parser->Values = Array(); // fixes bug in TemplateParser::SortParams + // ==== for TemplateParser class only: end ==== + $this->Application->Parser->SetParams( array_merge_recursive2($parser_params, $direct_params) ); $message = implode('&|&', explode("\n\n", $message, 2)); // preserves double \n in case when tag is located in subject field $message = $this->Application->Parser->Parse($message, 'email_template', 0); + + // ==== for TemplateParser class only: begin ==== + $this->Application->Parser->Pattern = $parser_pattern; + $this->Application->Parser->Values = $parser_values; + // ==== for TemplateParser class only: end ==== + $this->Application->Parser->SetParams($parser_params); // restore parser params // 2. replace line endings, that are send with data submitted via request