commit | 8615ecde321e6ebf825f43274fb566002849a8b9 | [log] [tgz] |
---|---|---|
author | Godofredo Contreras <godofredoc@google.com> | Wed Mar 15 03:14:52 2023 +0000 |
committer | CQ Bot Account <flutter-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Mar 15 03:14:52 2023 +0000 |
tree | 5ef8ed938182f3c5e1f65ba3f41b6d5313816e78 | |
parent | 7eee7213bdacf7cd79babad21a30c905dede0977 [diff] |
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"""