HTML encode test summary.

The test summary needs to be html encoded in order to be rendered
correctly in the github UI.

Bug: https://github.com/flutter/flutter/issues/117099
Change-Id: I0033a379252b8899b40c16ad88fb39af20613d95
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/40461
Reviewed-by: Ricardo Amador <ricardoamador@google.com>
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
diff --git a/recipe_modules/test_utils/api.py b/recipe_modules/test_utils/api.py
index 153de2f..09d42af 100644
--- a/recipe_modules/test_utils/api.py
+++ b/recipe_modules/test_utils/api.py
@@ -2,6 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import html
 import re
 
 from recipe_engine import recipe_api
@@ -80,7 +81,7 @@
       if byte_count >= MAX_CHARS:
         break
       output.insert(0, line)
-    return '\n'.join(output)
+    return html.escape('\n'.join(output))
 
   def _is_flaky(self, output):
     """Check if test step is flaky"""