From f9aa844d7edce36be3702916bccf5fa47e0d1fed Mon Sep 17 00:00:00 2001 From: dab246 Date: Mon, 15 Sep 2025 03:10:12 +0700 Subject: [PATCH] TF-4016 Add unit test for sanitize html with `supress_time_adjustment` tag --- ...andardize_html_sanitizing_transformers_test.dart | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/test/utils/standardize_html_sanitizing_transformers_test.dart b/core/test/utils/standardize_html_sanitizing_transformers_test.dart index d597b26e4..48b55b13c 100644 --- a/core/test/utils/standardize_html_sanitizing_transformers_test.dart +++ b/core/test/utils/standardize_html_sanitizing_transformers_test.dart @@ -3,7 +3,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'dart:convert'; void main() { - group('StandardizeHtmlSanitizingTransformers::test', () { + group('StandardizeHtmlSanitizingTransformers.process', () { const transformer = StandardizeHtmlSanitizingTransformers(); const htmlEscape = HtmlEscape(); const listHTMLTags = [ @@ -19,6 +19,7 @@ void main() { 'style', 'section', 'google-sheets-html-origin', + 'supress_time_adjustment', ]; const listOnEventAttributes = [ 'mousedown', @@ -188,5 +189,15 @@ void main() { expect(result, equals('')); }); + + test( + 'SHOULD persist supress_time_adjustment tag and remove href attribute of A tag ' + 'WHEN href is invalid', + () { + const inputHtml = ''; + final result = transformer.process(inputHtml, htmlEscape); + + expect(result, equals('')); + }); }); }