anchor.diff:    begin
       sSummaryItem :=
         FTemplate.GetTotalSummaryItemElement
  -        .Replace(STR_HTML_SUMMARY_MESSAGE_TYPE_KEYWORD, Item.MessageTypeKeyword)
  -        .Replace(STR_HTML_SUMMARY_MESSAGE_TYPE_NAME, Item.MessageTypeName)
  -        .Replace(STR_HTML_SUMMARY_MESSAGE_COUNT, Item.MessageCount.ToString);
  +        .Replace(STR_HTML_SUMMARY_MESSAGE_TYPE_KEYWORD, Encode(Item.MessageTypeKeyword))
  +        .Replace(STR_HTML_SUMMARY_MESSAGE_TYPE_NAME, Encode(Item.MessageTypeName))
  +        .Replace(STR_HTML_SUMMARY_MESSAGE_COUNT, Encode(Item.MessageCount.ToString));
       sAllSummaryItems := Iff.Get<String>(
         sAllSummaryItems.IsEmpty, sSummaryItem, sAllSummaryItems + sLineBreak + sSummaryItem);
     end;
  
positive.code: begin
    WriteLine(
      FTemplate.GetFooterElement
        .Replace(STR_HTML_FINISH_TIME, DateTimeToStr(FinishTime))
    );
  end;
  
  
negative.code: begin
    WriteLine('<head>');
    WriteLine('<meta charset="UTF-8">');
    WriteLine('<title>' + Encode(RSReportTitle) + '</title>');
  
    if Supports(FTemplate, IHTMLReportTemplate, HTMLTemplate) then
    begin
  