TF-1912 Sanitize html for email content when type is text/plain
(cherry picked from commit 169ede2f8b59cdf0362ad449d1182597cd4e5dee)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:core/presentation/utils/html_transformer/base/text_transformer.dart';
|
||||
import 'package:core/utils/app_logger.dart';
|
||||
|
||||
class SanitizeHtmlTransformers extends TextTransformer {
|
||||
|
||||
const SanitizeHtmlTransformers();
|
||||
|
||||
@override
|
||||
String process(String text) {
|
||||
final htmlEncoded = const HtmlEscape().convert(text);
|
||||
log('HtmlSanitizerTransformers::process:htmlEncoded: $htmlEncoded');
|
||||
return htmlEncoded;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user